how about launchMode as singleTask ? On Aug 25, 1:27 am, maxinfos <[email protected]> wrote: > Hello, > > I'm detecting my Android Phone movement using a Service. > > If the movement is too strong, this Service launch an Activity to > display a GUI confirmation (Yes/No). > > The fact is if the movement continues to be strong, the Activity is > launch many times. > > I tried to create a sort of GlobalContext which extends Application to > use setters and getters to know if the Activity is already launched in > my Service before launching it to display the GUI confirmation. > > On simulation mode, it works. > But on my HTC, the Activity is launch many times. > > Any idea about how to make an Activity to be like a singleton ? > > Thx. > Maxinfos
-- 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

