[android-developers] Re: Pass object from an activity to another?

2009-10-20 Thread Agus
serialize your Object to bytes using protobuffer and include the bytes in the intent's extras. On Fri, Oct 16, 2009 at 5:14 PM, Paul Turchenko wrote: > > Use Application class. > > On Oct 15, 10:44 pm, Sponge wrote: > > i think normaly by small objects to pass between activities ( like a > > str

[android-developers] Re: Pass object from an activity to another?

2009-10-16 Thread Paul Turchenko
Use Application class. On Oct 15, 10:44 pm, Sponge wrote: > i think normaly by small objects to pass between activities ( like a > string or an integer) i would also use the putExtras of the intent. > But if you want to pass an own object of type ClassX i first tried to > use the putExtras(Seria

[android-developers] Re: Pass object from an activity to another?

2009-10-15 Thread Sponge
i think normaly by small objects to pass between activities ( like a string or an integer) i would also use the putExtras of the intent. But if you want to pass an own object of type ClassX i first tried to use the putExtras(Serializible myObject) and this works if you only want to display it, but

[android-developers] Re: Pass object from an activity to another?

2009-10-15 Thread Yusuf Saib (T-Mobile USA)
Before you call startActivity with an Intent, first put extra into into it with Intent.putExtras: http://developer.android.com/reference/android/content/Intent.html#putExtras(android.os.Bundle) Yusuf Saib Android ·T· · ·Mobile· stick together The views, opinions and statements in this email are

[android-developers] Re: Pass object from an activity to another?

2009-10-15 Thread Long
I didn't realize your method. I will try that. Thanks. On Oct 15, 10:03 pm, niko20 wrote: > Hi, > > Why not pull the object out into global scope instead? Just make a new > java file, put a class in there with a static member variable of your > type. Then activity A can set the type (create "

[android-developers] Re: Pass object from an activity to another?

2009-10-15 Thread niko20
Hi, Why not pull the object out into global scope instead? Just make a new java file, put a class in there with a static member variable of your type. Then activity A can set the type (create "new" on it) in the global class. Now activity B can access it thru the global class. -niko On Oct 15,