public final class Tooleap
extends java.lang.Object
Tooleap API class.
This class exposes APIs for managing Tooleap Mini-Apps and getting information about the existing mini-apps.| Modifier and Type | Class and Description |
|---|---|
static class |
Tooleap.Consts
Static class of constant variables - for use with various methods of Tooleap
|
| Modifier and Type | Method and Description |
|---|---|
long |
addMiniApp(TooleapMiniApp miniApp)
Add a new Mini-App to Tooleap.
|
TooleapNotificationHelper |
buildNotification(long appId)
Get the notification helper for the Mini-App
|
java.util.ArrayList<TooleapMiniApp> |
getAllMiniApps()
Get a list containing all of the Mini-Apps added to Tooleap.
|
static Tooleap |
getInstance(android.content.Context context)
Get the single instance of the Tooleap API class (singleton).
|
TooleapMiniApp |
getMiniApp(long appId)
Get the Mini-App data
|
int |
getMiniAppNotificationBadge(long appId)
Get the current numeric value of the notification badge
|
long |
getVisibleAppId()
Get the Mini-App ID of the Mini-App currently visible to the user.
|
void |
removeAllMiniApps()
Remove all the Mini-Apps added to Tooleap.
|
void |
removeMiniApp(long appId)
Remove an existing Mini-App from Tooleap.
|
void |
showMiniApp(long appId)
Opens the side-screen with the Mini-App
|
boolean |
updateMiniApp(long appId,
TooleapMiniApp miniApp)
Update the Mini-App
|
boolean |
updateMiniAppAndNotify(long appId,
TooleapMiniApp miniApp)
Update the Mini-App and post a notification to be shown.
|
public static Tooleap getInstance(android.content.Context context)
public long addMiniApp(TooleapMiniApp miniApp)
public void removeMiniApp(long appId)
appId - The unique Mini-App ID.public void removeAllMiniApps()
public void showMiniApp(long appId)
appId - The unique Mini-App ID.public java.util.ArrayList<TooleapMiniApp> getAllMiniApps()
public int getMiniAppNotificationBadge(long appId)
appId - The unique Mini-App ID.TooleapMiniApp.notificationBadgeNumber,
TooleapNotificationHelper.incrementBadge()public TooleapMiniApp getMiniApp(long appId)
appId - The unique Mini-App ID.public boolean updateMiniApp(long appId,
TooleapMiniApp miniApp)
appId - The unique Mini-App ID.miniApp - The updated Mini-App data.public boolean updateMiniAppAndNotify(long appId,
TooleapMiniApp miniApp)
appId - The unique Mini-App ID.miniApp - The updated Mini-App data.TooleapNotificationHelper.buildAndNotify()public TooleapNotificationHelper buildNotification(long appId)
appId - The unique Mini-App ID.TooleapNotificationHelperpublic long getVisibleAppId()