views:

57

answers:

1

I would like to put a notification with an intent. My intent is basically action = DEFAULT and category = LAUNCHER in order to bring the activity that was launched into the front. When the app is not shown, there is no problem, the intent works perfectly and launches the last activity seen but when there is already an activity launched, onNewIntent is not called (activity is in singleTop mode).

I'm wondering how to relaunch the app from an intent to the last activity seen and call onNewIntent when the activity is already launched.

A: 

the problem is that your activity is defined as

 android:launchMode="singleTop"

when there is already an activity launched, onNewIntent is not called

implement the onDestroy method::

@Override
public void onDestroy(){
    super.onDestroy();
}
Jorgesys
The onDestroy is redefined but I don't see the goal here.I need to stay in singleTop launchMode, it is not just to make it beautiful... What I need to know is how to relaunch the previous activity or call newIntent on the one displayed.
fedj
hi fedj read this http://stackoverflow.com/questions/1711785/android-single-top-launch-mode-and-onnewintent-method
Jorgesys
Thanks Jorgesys
fedj