I have been struggling with this issue for a long long time, actually I've checked a lot of post in stackoverflow talking about the same but nothing definitive.
How to implement the Singleton pattern to achieve data sharing between Android activities? I am talking between activities, not classes, which one is the right way?
This is all the info I found:
1- The ones who recommend the standard Singleton form, the one that you might implement in Java, C, etc, here you got an example:
http://es.wikipedia.org/wiki/Singleton
2- The ones that suggest to implement it in the OnCreate method, like this:
http://androidcookbook.com/Recipe.seam?recipeId=1218
3- The ones that uses the Application implementation approach (not so sure about this one):
Is it acceptable practice to use Singleton Objects to save state or share data between Activities?
4- The ones that uses the "singleTask" approach, defining it in the manifest:
http://developer.android.com/guide/topics/manifest/activity-element.html#lmode
5- And more exoteric ways like this one (Actually this is not a Singleton I think):
Suggestions? Comments? Examples?
Google Android people recommends it as one way to share complex information between activities, but no clue about the best approach in Android.
http://developer.android.com/guide/faq/framework.html#3
Please help me to clarify this.