re-open background application via notification item

前端 未结 6 1693
生来不讨喜
生来不讨喜 2020-12-10 07:14

I got an app with tabs and a notification bar entry, when I send it to background (click on home button) and try to re-open the application via click on the notification ba

6条回答
  •  -上瘾入骨i
    2020-12-10 08:08

    I have faced the same issue and searched vehemently for an answer but here s the trick: Instead of trying to restart the app with the saved state using your notification intent, open a blank activity using the notification intent and in the onCreate() method of the activity, simply finish() it. This will take you back to the last viewed activity on the app.

提交回复
热议问题