public class TooleapMiniApp
extends java.lang.Object
A class that represents a Mini-App.
This is the base class for all types of Mini-Apps.
TooleapPopOutMiniApp,
TooleapPersistentMiniApp,
TooleapNotificationMiniApp,
TooleapHomeMiniApp| Modifier and Type | Field and Description |
|---|---|
int |
bubbleBackgroundColor
The Bubble's background color for this Mini-App in ARGB format.
|
java.lang.CharSequence |
contentText
The text to be displayed at second line of text in the applications menu.
|
java.lang.CharSequence |
contentTitle
The text to be displayed as the title of the Mini-App.
|
static int |
FLAG_AVAILABLE_ON_LOCK_SCREEN
A flag that indicates the bubble should appear even while while the device lock screen is on
|
static int |
FLAG_AVAILABLE_ONLY_ON_LOCK_SCREEN
A flag that indicates the bubble should appear only while the device lock screen is on
|
static int |
FLAG_NOT_AVAILABLE_ON_LOCK_SCREEN
A flag that indicates the bubble should hide itself while the device lock screen is on
|
byte[] |
icon
byte array representing the icon data.
|
int |
notificationBadgeNumber
The numeric value of the notification badge
|
long |
notificationSnoozeDuration
After the user dismisses a notification text balloon, the mini app can opt in silence all further notifications for a duration.
|
java.lang.CharSequence |
notificationText
The text to be displayed in the text balloon when the notification first arrives.
|
java.util.Date |
when
The timestamp pertaining to the notification (usually the time the event occurred).
|
| Modifier and Type | Method and Description |
|---|---|
long |
getAppId()
Get the unique Mini-App ID (identifier) generated for this Mini-App.
|
int |
getBubbleSize()
Get the bubble size (The bubble radius in dp)
|
android.content.Intent |
getContentIntent()
Get the intent to execute when the user wants open the Mini-App
|
int |
getIconOpacity()
Get the bubble opacity (Alpha channel)
|
int |
getLockScreenAvailability()
Returns whether the bubble should appear also/exclusively on the lock screen.
|
void |
setBubbleSize(int bubbleRadius)
Set the bubble radius size in dp.
|
TooleapMiniApp |
setContentIntent(android.content.Intent contentIntent)
The intent to execute when the user wants open the Mini-App
|
TooleapMiniApp |
setIcon(android.graphics.Bitmap icon)
Set the Mini-App icon.
|
TooleapMiniApp |
setIcon(byte[] icon)
Set the Mini-App icon.
|
TooleapMiniApp |
setIcon(android.content.Context context,
int resourceId)
Set the Mini-App icon.
|
void |
setIconOpacity(int alphaChannel)
Set the icon opacity (The icon alpha channel).
|
void |
setLockScreenAvailability(int lockScreenAvailability)
Sets whether the bubble should appear also/exclusively on the lock screen
Set FLAG_NOT_AVAILABLE_ON_LOCK_SCREEN if you want the bubble to hide itself while the device lock screen is on
Set FLAG_AVAILABLE_ON_LOCK_SCREEN if you want the bubble to appear even while while the device lock screen is on
Set FLAG_AVAILABLE_ONLY_ON_LOCK_SCREEN if you want the bubble to appear only while the device lock screen is on
|
public static final int FLAG_NOT_AVAILABLE_ON_LOCK_SCREEN
public static final int FLAG_AVAILABLE_ON_LOCK_SCREEN
public static final int FLAG_AVAILABLE_ONLY_ON_LOCK_SCREEN
public int bubbleBackgroundColor
public java.lang.CharSequence contentText
TooleapNotificationHelper.setContentText(CharSequence)public java.lang.CharSequence contentTitle
public byte[] icon
setIcon(android.content.Context, int),
setIcon(android.graphics.Bitmap),
setIcon(byte[])public int notificationBadgeNumber
Tooleap.getMiniAppNotificationBadge(long),
TooleapNotificationHelper.incrementBadge()public java.lang.CharSequence notificationText
TooleapNotificationHelper.setNotificationText(CharSequence)public java.util.Date when
TooleapNotificationHelper.setWhen(java.util.Date)public long notificationSnoozeDuration
public TooleapMiniApp setIcon(byte[] icon)
icon - byte array representing the icon data.icon,
setIcon(android.content.Context, int),
setIcon(android.graphics.Bitmap)public TooleapMiniApp setIcon(android.graphics.Bitmap icon)
icon,
setIcon(android.content.Context, int),
setIcon(byte[])public TooleapMiniApp setIcon(android.content.Context context, int resourceId)
icon,
setIcon(byte[]),
setIcon(android.graphics.Bitmap)public TooleapMiniApp setContentIntent(android.content.Intent contentIntent)
getContentIntent()public android.content.Intent getContentIntent()
setContentIntent(android.content.Intent)public long getAppId()
public void setIconOpacity(int alphaChannel)
alphaChannel - The icon alpha channel (0 - 255)public int getIconOpacity()
public void setBubbleSize(int bubbleRadius)
bubbleRadius - The bubble radius size in dp (10 - 50)public int getBubbleSize()
public void setLockScreenAvailability(int lockScreenAvailability)
lockScreenAvailability - Where should the bubble appearFLAG_NOT_AVAILABLE_ON_LOCK_SCREEN,
FLAG_AVAILABLE_ON_LOCK_SCREEN,
FLAG_AVAILABLE_ONLY_ON_LOCK_SCREENpublic int getLockScreenAvailability()
FLAG_NOT_AVAILABLE_ON_LOCK_SCREEN,
FLAG_AVAILABLE_ON_LOCK_SCREEN,
FLAG_AVAILABLE_ONLY_ON_LOCK_SCREEN