Dealing with SavedInstances, and restoration of activity

前端 未结 2 1294
故里飘歌
故里飘歌 2021-01-27 14:54

basically my app has 2 activities.Say \"A\" and \"B\" . A launches B.

Activity B plays music and also has a notification.

Case 1:when the view is still on activi

2条回答
  •  悲哀的现实
    2021-01-27 15:21

    Basically if you have pressed a back button,restoration of activity should be done using shared preferences/or a database but if you haven't pressed the back button and then you want to restore the state of the activity (because the activity was destroyed by the system ) then the bundle savedinstances can be used ...

提交回复
热议问题