Issue
While checking the documentation about using onSaveInstanceState, a question popped up.
Let's say I'm using an app with several activities and now I'm in a specific activity that got started by a previous one. The current activity accepts extra values from the previous one.
If I get a phone call and then navigate back to the activity, it's recreated. But will it remember the original intent of the previous activity that started it? will it be able to get the extra variables from it after recreating itself?
To simplify things:
Activity A starts Activity B (and passing extras to it). Then (while in B) there's an incoming call. I go back to the app so B is recreated- will I still be able to get the extras passed from original the original activity A ?
Solution
Yes it will, the simplest way to check that is to rotate the screen when the 2nd activity is running, it will be destroyed and then recreated and you will notice that you can still get the extras. Try it and see by your own.
Answered By - Anis LOUNIS
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.