How to solve the problem of launch the apps twice or more?

by Dianne Hackborn » Wed, 21 Apr 2010 11:26:25 GMT

Sponsored Links
 Make sure you aren't calling startActivity() anywhere, such as in

Look at the log (adb logcat) and event log (adb logcat -b events) to see
what the system is saying about launching and handling activities.

Please don't use singleTask or singleInstance to fix such problems, they are
not needed and have other repercussions you probably don't want.

> >

How to solve the problem of launch the apps twice or more?

by Dianne Hackborn » Wed, 21 Apr 2010 13:07:44 GMT

 Starting a service doesn't have anything to do with the activity stack.  It
is only needed if you actually must have a service running even after the
user leaves your app.  (And of course you must have a good plan for how you
will stop the service, so it doesn't get left running forever.)

> > > >

Sponsored Links

Other Threads

1. Not using a WakeLock so why does the device stay awake?

I have a service which, when started, does some stuff (like
downloading files) typically taking about 2-3 minutes.

If I start this service and then immediately use the power button to
switch off the screen, then I would expect the phone, at some point,
to fall asleep. But it never seems to fall asleep while the service is
still doing its stuff. At least, not on my Nexus One.

I'm not using a wake lock (though I do use
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON in the activity that
monitors the service progress).

So is it true that I don't need to use a wake lock?


2. Intisari untuk - 25 Pesan pada 1 Topik

soal ganti nama, maksudnya gimana ya, di saya sih (baru 2) muncul 
namanya, bukan no PIN nya

yg lain masih pending :P

ke thread na langsung aja via web, cek dsana ada 2 apk di attached...
-- Jus* || owner white google 1 || ~ send using pc jang krik krik krik ~ $ $ -- "Indonesian Android Community [id-android]"

3. Android Market place and certificate usag

4. TabActivity and startAcitivtyForResult

5. share root cliq

6. Unable to set up email application on emulator for android 1.6

7. Eclipse + cupcake + other android projects in build path = VerifyError