android - How to start Activity with custom parameters -


i need start activity parameters. know can intents , bundles, far know it's possible string, boolean, etc...

i have custom parameters, user-made classes.

for example, got plc-class in main activity, contains many variables , methods, , need use in other activity.

i know "public static" method, i'm not fan of it, , i'm sure can find else fits need.

i hope guys can me bye

in opinion can make bean class... have getter/setter method.. can set value there, , retrieve values in other activities.using class.

e.g

public class constants{      public static bean userbeen=new bean();  } 

main activity

constants.userbeen.setvalue("anything"); 

in other activity,, can value using userbeenobj;

other activity

   string s=constants.userbeen.getvalue(); 

hope helps you. use this.!


Comments