Issue
I have a activity where I do nothing with the following function (onPause/onStop/onDestroy). It is just how it was when you create a activity from scratch.
Now when I switch to a new app or I start a new activity with a new intent the activity is destroyed. The android system calls onPause -> onStop -> onDestroy.
How can I prevent the app from calling onDestory on that specific activity?
Code for starting the new activity:
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
getApplicationContext().startActivity(intent);
Manifest code:
<activity android:name=".WebviewActivity">
</activity>
As you can see I have nothing in there.
Solution
Make sure you didn't accidentally enabled "don't keep activities" mode in developer options:
Answered By - dor506
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.