I want to be able to "persist" my tooleap activity, so that when user click on mini app Icon, my activity doesn't have to be reloaded every time.
This behaviour is implemented in Tooleap Search activity, when I reopened search activity from anywhere, search activity is immediately shown (no loading indicator).
I already launch my tooleap activity as persistent, here's my code to launch the mini app
TooleapPersistentMiniApp miniApp = new TooleapPersistentMiniApp(this, TooleapTestActivity.class);
miniApp.allowUserToDismiss(true);
miniApp.contentTitle = getResources().getString(R.string.app_name);
miniApp.contentText = getResources().getString(R.string.app_name);
miniApp.bubbleBackgroundColor = 0xFF03A9F4;
miniApp.notificationText = getResources().getString(R.string.tooleap_start_notif);
miniApp.when = new Date();
Tooleap.getInstance(this).addMiniApp(miniApp);
Here's my AndroidManifest which is directly associated with tooleap
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myapp.package"
android:installLocation="internalOnly" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<activity android:name=".TooleapTestActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:launchMode="singleInstance"
android:taskAffinity=".tooleap">
<intent-filter>
<action android:name="com.tooleap.sdk.TOOLEAP_SHOW"/>
</intent-filter>
</activity>
<service android:name="com.tooleap.sdk.TooleapAppService"/>
<service android:name="com.tooleap.sdk.TooleapUIService"
android:process=":UIService"
android:exported="true">
<intent-filter>
<action android:name="com.tooleap.sdk.BIND_UI_SERVICE" />
</intent-filter>
</service>
<receiver android:name="com.tooleap.sdk.TooleapReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REPLACED"/>
<data android:scheme="package"/>
</intent-filter>
<intent-filter>
<action android:name="com.tooleap.sdk.TOOLEAP_ACTION"/>
</intent-filter>
</receiver>
</manifest>
Here's the flow detail:
- I clicked my miniApp icon
- Tooleap open its sidebar and showing loading indicator
- After loading complete, tooleap show my TooleapTestActivity
- I swiped left to hide tooleap sidebar, tooleap show another loading indicator
- repeat step 1 :)
What am I doing wrong here? I can't seem to have same behavior as Tooleap Search Activity persistency.