public class Hover
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Hover.ActionChoiceListener |
static interface |
Hover.DownloadListener |
static interface |
Hover.SimChoiceListener |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BRAND_LOGO |
static java.lang.String |
BRAND_NAME |
Modifier and Type | Method and Description |
---|---|
static java.util.List<HoverAction> |
getAllActions(Context c)
Get a list of all your actions that have been downloaded from Hover.
|
static java.util.List<HoverAction> |
getAllValidActions(Context c)
Get a list of all your actions that can be currently run based on this user's inserted SIM cards.
|
static int |
getBrandLogo(Context c) |
static java.lang.String |
getBrandName(Context c) |
static java.util.List<SimInfo> |
getPresentSims(Context c)
Get a list of the user's present SIMs.
|
static java.util.List<HoverAction> |
getValidActions(java.lang.String[] actionIds,
Context c)
Filter a list of actions that can be currently run based on this user's inserted SIM cards.
|
static void |
goToAccessibility(Context c) |
static void |
initialize(Context c)
Call as soon as your application starts.
|
static void |
initialize(Context c,
Hover.DownloadListener listener)
Version of initialize which takes a DownloadListener to notify you when your actions have finished downloading.
|
static void |
initialize(Context c,
java.lang.String apiKey)
Version of initialize which takes an API Key instead of specifying in Manifest.
|
static void |
initialize(Context c,
java.lang.String apiKey,
Hover.DownloadListener listener)
Version of initialize which takes a DownloadListener so that you getPresent a callback when it has finished downloading your actions.
|
static boolean |
isAccessibilityEnabled(Context c) |
static boolean |
isActionSimPresent(java.lang.String actionId,
Context c)
Determine whether a given USSD action should be started based on the user's currently inserted SIM cards.
|
static boolean |
isOverlayEnabled(Context c) |
static void |
requestActionChoice(java.lang.String[] actionIds,
Hover.ActionChoiceListener actionChoiceListener,
Context c)
This is for choosing ane action between multiple actions representing the same idea on different networks.
|
static void |
requestSimChoice(java.util.List<SimInfo> sims,
Hover.SimChoiceListener simChoiceListener,
Context c)
This is for having the user choose ane SIM.
|
static void |
setBranding(java.lang.String name,
int drawable,
Context c)
Set the logo and app name to use on the processing screen.
|
static void |
updateActionConfigs(Hover.DownloadListener downloadListener,
Context c)
Update your Hover Actions from the Hover server.
|
static void |
updateSimInfo(Context c)
Recheck and update the User's SIM info.
|
public static final java.lang.String BRAND_NAME
public static final java.lang.String BRAND_LOGO
public static void initialize(Context c)
c
- Contextpublic static void initialize(Context c, Hover.DownloadListener listener)
c
- Contextlistener
- instance of com.hover.sdk.api.Hover.DownloadListenerpublic static void initialize(Context c, java.lang.String apiKey)
c
- ContextapiKey
- The API key provided by Hover when you create an app in the dashboardpublic static void initialize(Context c, java.lang.String apiKey, Hover.DownloadListener listener)
c
- ContextapiKey
- The API key provided by Hover when you create an app in the dashboardlistener
- instance of com.hover.sdk.api.Hover.DownloadListenerpublic static void setBranding(java.lang.String name, int drawable, Context c)
name
- String to show at the top of the processing screendrawable
- int which specifies your logo to show at the top of the processing screen, e.g. R.drawable.host_logoc
- Contextpublic static java.lang.String getBrandName(Context c)
public static int getBrandLogo(Context c)
public static void updateSimInfo(Context c)
c
- ContextgetPresentSims(Context)
public static void updateActionConfigs(Hover.DownloadListener downloadListener, Context c)
c
- ContextdownloadListener
- Implement to find out when actions have successfully downloadedpublic static void requestActionChoice(java.lang.String[] actionIds, Hover.ActionChoiceListener actionChoiceListener, Context c) throws HoverConfigException
actionIds
- List of Action IDs to choose from. No action should be for the same network as another.c
- ContextactionChoiceListener
- Implement to receive choiceHoverConfigException
- Throws if READ_PHONE_STATE permission not granted or Hover.initialize() not calledpublic static java.util.List<HoverAction> getAllActions(Context c) throws HoverConfigException
c
- ContextHoverConfigException
- Throws if READ_PHONE_STATE permission not granted or API key invalidHoverAction
,
SimHelper.getPresentSims(Context)
,
ActionHelper.getValidActions(String[], Context)
public static java.util.List<HoverAction> getValidActions(java.lang.String[] actionIds, Context c) throws HoverConfigException
c
- ContextHoverConfigException
- Throws if READ_PHONE_STATE permission not granted or API key invalidHoverAction
,
SimHelper.getPresentSims(Context)
,
ActionHelper.getAllValidActions(Context)
public static java.util.List<HoverAction> getAllValidActions(Context c) throws HoverConfigException
c
- ContextHoverConfigException
- Throws if READ_PHONE_STATE permission not granted or API key invalidHoverAction
,
SimHelper.getPresentSims(Context)
,
ActionHelper.getValidActions(String[], Context)
public static java.util.List<SimInfo> getPresentSims(Context c) throws HoverConfigException
c
- ContextHoverConfigException
- Throws if READ_PHONE_STATE permission not granted or Hover.initialize() not calledSimInfo
public static boolean isActionSimPresent(java.lang.String actionId, Context c) throws HoverConfigException
actionId
- Action ID from your dashboardc
- ContextHoverConfigException
- Throws if READ_PHONE_STATE permission not granted or API key invalidSimInfo
public static void requestSimChoice(java.util.List<SimInfo> sims, Hover.SimChoiceListener simChoiceListener, Context c) throws HoverConfigException
sims
- List of SimInfo object to choose fromc
- ContextsimChoiceListener
- Implement to recieve choiceHoverConfigException
- Throws if READ_PHONE_STATE permission not granted or Hover.initialize() not calledpublic static boolean isAccessibilityEnabled(Context c)
public static boolean isOverlayEnabled(Context c)
public static void goToAccessibility(Context c)