[android-developers] Re: can we assure that Application#onCreate always runs before the Provier#onCreate and Activity#onCreate
I wouldn't count on one or the other. For your problem, just have a global singleton for accessing the data, and retrieve that everywhere you need it. The first one who gets it will initialize it. On Mon, Nov 24, 2008 at 9:16 PM, magicpig [EMAIL PROTECTED] wrote: Hi, I have a AndroidManifest.xml: application . activity /activity provider... provider... /application I guess the Application#onCreate always runs first. But during some experiments, Provider#onCreate may run before Application#onCreate. I want to find a place that can read the meta-data from AndroidManifest.xml that will be used for the whole application and I put it in Application#onCreate. During my experiment... I am afraid I have made a mistake. Any one can tell me where is the right place, the first will read the meta-data before all the onCreates run. Thanks a lot. -- Dianne Hackborn Android framework engineer [EMAIL PROTECTED] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com 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 -~--~~~~--~~--~--~---
[android-developers] Re: can we assure that Application#onCreate always runs before the Provier#onCreate and Activity#onCreate
Thanks. Can we assure application#OnCreate run before activity#onCreate ? On Nov 25, 10:25 am, Dianne Hackborn [EMAIL PROTECTED] wrote: I wouldn't count on one or the other. For your problem, just have a global singleton for accessing the data, and retrieve that everywhere you need it. The first one who gets it will initialize it. On Mon, Nov 24, 2008 at 9:16 PM, magicpig [EMAIL PROTECTED] wrote: Hi, I have a AndroidManifest.xml: application . activity /activity provider... provider... /application I guess the Application#onCreate always runs first. But during some experiments, Provider#onCreate may run before Application#onCreate. I want to find a place that can read the meta-data from AndroidManifest.xml that will be used for the whole application and I put it in Application#onCreate. During my experiment... I am afraid I have made a mistake. Any one can tell me where is the right place, the first will read the meta-data before all the onCreates run. Thanks a lot. -- Dianne Hackborn Android framework engineer [EMAIL PROTECTED] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com 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 -~--~~~~--~~--~--~---