Once you create a Tooleap Activity, it can be used in normal mode or in miniApp mode (but only one at a time).
To set up your activity as a Tooleap Activity, you need to follow some steps. Firstly, we will change the activity type by using the following activity attribute (in your activity attributes section).
Then in your manifest, you need to add the following lines (remember to replace with your activity name):
AddActivityText(test, <intent-filter> <action android:name="com.tooleap.sdk.TOOLEAP_SHOW"/> </intent-filter> ) SetActivityAttribute(test, android:theme, "@android:style/Theme.Translucent") SetActivityAttribute(test, android:launchMode, "singleInstance") SetActivityAttribute(test, android:taskAffinity, ".tooleap")
That is all the preparation that is required.
Now remember in miniApp mode the size of the Activity will be different (80%x, 100%y-105dip). In order to find out if the activity is in normal or miniApp mode you can use the MSTooleapActivityHelper object:
Dim TA As MSTooleapActivityHelper If TA.isStartedByTooleap Then lbl.Text = "Started by Tooleap" Else lbl.Text = "Started in normal mode" End If
To get the current activity’s app id (each miniApp must have its own ID)
Dim appID As Long = TA.getCurrentActivityTooleapAppId