> Sorry for the newbie question, but does anyone know how I can check > whether an IntentService is already running? > > I'm starting an IntentService from onCreate within a normal Activity, > and that means that if the user minimises and maximises the > application, it gets called twice.
Android does not have a "minimize" or "maximize" the application. If you mean the user presses the HOME key, then that will only cause onCreate() of your activity to be invoked again if there has been a substantial period of time elapsed, enough that your original activity was kicked out of RAM. And, in that case, you can use onSaveInstanceState() to persist a flag indicating whether or not you need to re-run the startService() call. If you mean something else, let us know. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- 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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using "remove me" as the subject.