Back to main activity from notification-created activity

后端 未结 9 2119
粉色の甜心
粉色の甜心 2020-11-30 04:33

I\'m trying to implement the behaviour described here, where a notification (or whatever) starts an \"internal\" activity in your app, and then when the user pressed back it

9条回答
  •  旧巷少年郎
    2020-11-30 05:17

    Nice.

    But be aware that is does not work on pre-3.0 (pre API level 11) system because PendingIntent.getActivities() is not available there.

    And that is the same for constructing a backstack to access an activity from a notification (via Intent) and have the back button behaves coherently with your application (detail activity comes back to list activity for example).

提交回复
热议问题