Hi,
You can use static variable but you have check null before use

*if(obj != null)

Or
you can use Shared preference for sharing data to all activities:

http://developer.android.com/guide/topics/data/data-storage.html#pref


*Regards,
AshishR


Use


On Tue, Apr 12, 2011 at 2:26 PM, Christophe <
[email protected]> wrote:

> that's probably the case. They should mention in the documentation
> that static variable can be set to null at anytime, since they
> explicitely state that static variable can be use to pass data between
> activities ... (http://developer.android.com/resources/faq/
> framework.html#3)
>
> What the best way to keep data then ? May be a singleton ? I'm afraid
> the instance will be set to null too :(
>
> On Apr 12, 10:04 am, appel <[email protected]> wrote:
> > If you don't set them to null somewhere it is most likely because your
> > application process has been killed and restarted.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to