There are two activities in my example, MainActiviy and EmptyActivity. In the MainActiviy, it create a notification, which target is the EmptyActivity. Well, EmptyActivity is very simple, just finish itself in its onCreate.
i added the trace in the MainActiviy's onDestroy and onBackPressed I have invoked the finish() method in the onBackPress
The problem is:
open the application, and press back key, the log is printed in the logcat, means the MainActiviy's onDestroyed is invoked.
if open the application, and press the notification from the status bar, and then press back key, then no log in the onDestroy is printed
Strangely, if reopen the application, then the log in the onDestroy is printed..
Has anyone known why this happened. Thanks
i uploaded the example to the google drive