java - Declaring a global variable to use in all activities -


i creating custom class in main application class. lets mainaccount.

now, creating many activities. want mainaccount variable in every activity, how can that? 1 way put in intent , pass each activity. there better way, making global etc?

best regards

have thought using preferences? great resource more info is. http://mobile.tutsplus.com/tutorials/android/android-application-preferences/

or can create class extends application demostrated http://www.helloandroid.com/category/topics-covered/global-variables


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -