public class MobirooDrm
extends java.lang.Object
MobirooDrm.MobirooException
and MobirooDrm.MobirooStoreNotFoundException
.
Please read the documented instructions for how to handle these exception
cases in your application.Modifier and Type | Class and Description |
---|---|
static class |
MobirooDrm.MobirooException
An exception will be thrown when the DRM library fails to initialise.
|
static class |
MobirooDrm.MobirooSecurityException
As with the
MobirooDrm.MobirooException , when the app receives this exception
the application should be blocked. |
static class |
MobirooDrm.MobirooStoreNotFoundException
As with the
MobirooDrm.MobirooException , when the app receives this exception
the application should be blocked. |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TAG
The class tag name
|
Modifier and Type | Method and Description |
---|---|
static void |
blockActivityForStoreNotFoundException(android.app.Activity activity)
When you want the library to block your activity when
MobirooDrm.MobirooStoreNotFoundException occurres. |
static void |
blockInputMethodViewForStoreNotFoundException(android.inputmethodservice.InputMethodService inputMethodService)
When you want the library to block your custom input method view when
MobirooDrm.MobirooStoreNotFoundException occurres. |
static boolean |
isDebugLog()
Returns if the logging is enabled for this model
|
static void |
logDebug(java.lang.String msg)
Send a WARN log message.
|
static void |
logError(java.lang.String msg)
Send an ERROR log message.
|
static void |
logWarn(java.lang.String msg)
Send a WARN log message.
|
static void |
setDebugLog(boolean state)
Set the debugging mode.
|
static void |
validateActivity(android.app.Activity activity)
Only for use with Activities.
|
static void |
validateService(android.content.Context context)
For use from either the
Service#onStartCommand(Intent, int, int) ,
Service#onCreate() , WallpaperService#onStartCommand(Intent, int, int) ,
WallpaperService#onCreateEngine() and WallpaperService#onCreate()
method implementations. |
static void |
validateWidgetUpdate(android.content.Context context,
android.appwidget.AppWidgetManager appWidgetManager,
int appWidgetId)
For use within the
AppWidgetProvider#onUpdate(Context, AppWidgetManager, int[]) method. |
static void |
validateWidgetUpdate(android.content.Context context,
android.appwidget.AppWidgetManager appWidgetManager,
int[] appWidgetIds)
For use within the
AppWidgetProvider#onUpdate(Context, AppWidgetManager, int[]) method. |
public static void validateActivity(android.app.Activity activity) throws MobirooDrm.MobirooStoreNotFoundException, MobirooDrm.MobirooSecurityException, MobirooDrm.MobirooException
NativeActivity
implementations as well as
the standard Activity
class.
In the event of any Exception being thrown; please follow the policies
defined in the MobirooDrm.MobirooException
or MobirooDrm.MobirooStoreNotFoundException
classes.activity
- the application activity, typically "this".MobirooDrm.MobirooException
- throws MobirooDrm.MobirooException
when the DRM library fails to load.MobirooDrm.MobirooStoreNotFoundException
- MobirooDrm.MobirooStoreNotFoundException
when the Apps Unlimited storefront is not installed.MobirooDrm.MobirooSecurityException
public static void validateWidgetUpdate(android.content.Context context, android.appwidget.AppWidgetManager appWidgetManager, int appWidgetId) throws MobirooDrm.MobirooStoreNotFoundException, MobirooDrm.MobirooSecurityException, MobirooDrm.MobirooException
AppWidgetProvider#onUpdate(Context, AppWidgetManager, int[])
method.context
- The Context in which this receiver is running.appWidgetManager
- A AppWidgetManager object you can call AppWidgetManager.updateAppWidget on.appWidgetIds
- The appWidgetId for which an update is needed.MobirooDrm.MobirooException
- MobirooDrm.MobirooException
when the DRM library fails to loadMobirooDrm.MobirooStoreNotFoundException
- MobirooDrm.MobirooStoreNotFoundException
when the Apps Unlimited storefront is not installed.MobirooDrm.MobirooSecurityException
public static void validateWidgetUpdate(android.content.Context context, android.appwidget.AppWidgetManager appWidgetManager, int[] appWidgetIds) throws MobirooDrm.MobirooStoreNotFoundException, MobirooDrm.MobirooSecurityException, MobirooDrm.MobirooException
AppWidgetProvider#onUpdate(Context, AppWidgetManager, int[])
method.
Supports calling with multiple widget IDs.context
- The Context in which this receiver is running.appWidgetManager
- A AppWidgetManager object you can call AppWidgetManager.updateAppWidget on.appWidgetIds
- The appWidgetIds for which an update is needed. Note that this may be all of the AppWidget instances for this provider, or just a subset of them.MobirooDrm.MobirooException
- MobirooDrm.MobirooException
when the DRM library fails to loadMobirooDrm.MobirooStoreNotFoundException
- MobirooDrm.MobirooStoreNotFoundException
when the Apps Unlimited storefront is not installed.MobirooDrm.MobirooSecurityException
public static void validateService(android.content.Context context) throws MobirooDrm.MobirooStoreNotFoundException, MobirooDrm.MobirooSecurityException, MobirooDrm.MobirooException
Service#onStartCommand(Intent, int, int)
,
Service#onCreate()
, WallpaperService#onStartCommand(Intent, int, int)
,
WallpaperService#onCreateEngine()
and WallpaperService#onCreate()
method implementations.context
- the service context to be validatedMobirooDrm.MobirooException
- MobirooDrm.MobirooException
when the DRM library fails to loadMobirooDrm.MobirooStoreNotFoundException
- MobirooDrm.MobirooStoreNotFoundException
when the Apps Unlimited storefront is not installed.MobirooDrm.MobirooSecurityException
public static void blockInputMethodViewForStoreNotFoundException(android.inputmethodservice.InputMethodService inputMethodService) throws java.lang.NullPointerException
MobirooDrm.MobirooStoreNotFoundException
occurres.
this method will create a new view and replace you input method view by calling: InputMethodService.setInputView(android.view.View)
method.
the replaced view, will provide the user with the help needed to switch to another input view, install the store, or hide the view.inputMethodService
- your InputMethodService
service.java.lang.NullPointerException
- thows exception when the service reference is nullpublic static void blockActivityForStoreNotFoundException(android.app.Activity activity) throws java.lang.NullPointerException
MobirooDrm.MobirooStoreNotFoundException
occurres.
this method will create an AlertDialog and block your activity view.
the Alert Dialog, will provide the user with the help needed download the storefront app.activity
- your Activity
service.java.lang.NullPointerException
- thows exception when the activity reference is nullpublic static void logDebug(java.lang.String msg)
msg
- The message you would like logged.public static void logError(java.lang.String msg)
msg
- The message you would like logged.public static void logWarn(java.lang.String msg)
msg
- The message you would like logged.public static boolean isDebugLog()
public static void setDebugLog(boolean state)
boolean
-