I’ve been trying to find the solution for the following problem, but with no success:
I have an activity class that is showing web pages(presentation) which need to be logged (what user entered, duration, etc.). On some pages there are buttons which should open new presentation.
Calling activity – CLMWebView.class:
Intent intent = new Intent(this, CLMWebView.class);
this.startActivity(intent);
Between those lines of code are some intent.putExtra which are, I belive, not relevant for this.
As you can see, I am trying to start new activity with the same class as the calling activity. However, nothing happens. Any ideas?
EDIT:
Android manifest for CLMWebView.class
<activity android:name="com.msoft.views.CLMWebView"
android:configChanges="orientation|keyboard"
android:icon="@drawable/svicon"
android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.PICK"/>
<action android:name="android.intent.action.CHOOSER" />
<action android:name="android.intent.action.WEB_SEARCH" />
</intent-filter>
</activity>
singleTopactivity, visible, and in same task is not recreated.Quoting the official docs:
A better alternative will be to place the functionality in a fragment, and add a new fragment to back stack each time.