public interface IMDApplication
RuntimeInfo.getApplication()
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BLUETOOTH_SERVICE |
static java.lang.String |
DEVICE_AUTHENTICATOR_SERVICE |
static java.lang.String |
LOCATION_MANAGER_SERVICE |
static java.lang.String |
ORIENTATION_SERVICE |
static java.lang.String |
SOUND_SERVICE |
Modifier and Type | Method and Description |
---|---|
boolean |
allowUnsecureSSLConnectionForURL(java.lang.String theURL)
Disable full SSL security checking for this URL
|
void |
changeAppDirectionality(int direction)
Changes the application directionality.
|
void |
changeSize(int width,
int height)
Changes the dimensions of the main window.
|
void |
destroyApp()
Destroys the application.
|
IMDApplicationListener |
getApplicationListener()
Gets current @link
IMDApplicationListener |
java.lang.String |
getAppProperty(java.lang.String key)
Gets the application property
|
IPushNotificationListener |
getPushNotificationListener()
Gets current
IPushNotificationListener |
java.lang.Object |
getService(java.lang.Class clazz)
Returns a service instance for particular class
|
java.lang.Object |
getService(java.lang.String serviceName)
Returns a service instance for the particular service name.
|
boolean |
isRunningOnMDThread()
Checks if the current thread is the main one.
|
void |
pauseApp()
Pauses the application.
|
boolean |
platformRequest(java.lang.String url)
Sends request to the platform.
|
void |
resumeApp()
Resumes the application.
|
void |
runAsync(ICallable task,
IResultCallback callback)
Runs the given
task asynchronously. |
void |
runAsync(ICallable task,
IResultCallback callback,
boolean runCallbackOnMainThread)
Runs the given
task asynchronously. |
void |
runAsync(java.lang.Runnable task)
Runs the given
task asynchronously. |
void |
runAsync(java.lang.Runnable task,
IResultCallback callback)
Runs the given
task asynchronously. |
void |
runAsync(java.lang.Runnable task,
IResultCallback callback,
boolean runCallbackOnMainThread)
Runs the given
task asynchronously. |
void |
runOnMDThread(java.lang.Runnable task)
Runs task on the main MD thread.
|
void |
runOnMDThreadAndWait(java.lang.Runnable task)
Runs task on the main MD thread and waits until it has been executed.
|
IMDApplicationListener |
setApplicationListener(IMDApplicationListener listener)
Sets listener to receive Application events events.
|
IPushNotificationListener |
setPushNotificationListener(IPushNotificationListener listener)
Sets listener to receive Push Notification messages.
|
void |
startApp()
Starts the application.
|
static final java.lang.String DEVICE_AUTHENTICATOR_SERVICE
static final java.lang.String LOCATION_MANAGER_SERVICE
static final java.lang.String ORIENTATION_SERVICE
static final java.lang.String BLUETOOTH_SERVICE
static final java.lang.String SOUND_SERVICE
boolean allowUnsecureSSLConnectionForURL(java.lang.String theURL)
theURL
- true
if the URL may bypass SSL security checks.IPushNotificationListener setPushNotificationListener(IPushNotificationListener listener)
listener
- - to send PN messagesIPushNotificationListener getPushNotificationListener()
IPushNotificationListener
IPushNotificationListener
or null
if it hasn't been set.IMDApplicationListener setApplicationListener(IMDApplicationListener listener)
listener
- - to send Application events to.IMDApplicationListener getApplicationListener()
IMDApplicationListener
IMDApplicationListener
or null
if it hasn't been set.void startApp()
void pauseApp()
void resumeApp()
void destroyApp()
void changeSize(int width, int height)
void changeAppDirectionality(int direction)
direction
- - can be nUIConstants.TEXT_DIRECTION_LTR
or nUIConstants.TEXT_DIRECTION_RTL
java.lang.String getAppProperty(java.lang.String key)
key
- - key for the requested propertyboolean platformRequest(java.lang.String url) throws javax.microedition.io.ConnectionNotFoundException
url
- to process.javax.microedition.io.ConnectionNotFoundException
void runAsync(java.lang.Runnable task, IResultCallback callback, boolean runCallbackOnMainThread)
task
asynchronously.task
- - the task will be executed in a new thread.callback
- - is used to notify if task has been finished.runCallbackOnMainThread
- - if true, the callback will run on the main thread, otherwise in the new created thread.void runAsync(java.lang.Runnable task, IResultCallback callback)
task
asynchronously.task
- - task to be executed in a new thread.callback
- - callback to notify callers task has been finished with success or not. This will be called on main thread, which can access UI elements.void runAsync(java.lang.Runnable task)
task
asynchronously.task
- - task to be executed in a new thread.void runAsync(ICallable task, IResultCallback callback, boolean runCallbackOnMainThread)
task
asynchronously.task
- - the task will be executed in a new thread.callback
- - is used to notify if task has been finished.runCallbackOnMainThread
- - if true, the callback will run on the main thread.void runAsync(ICallable task, IResultCallback callback)
task
asynchronously.task
- - task to be executed in a new thread.callback
- - callback to notify callers task has been finished with success or not. This will be called on main thread, which can access UI elements.void runOnMDThread(java.lang.Runnable task)
task
- - the task to execute.void runOnMDThreadAndWait(java.lang.Runnable task)
task
- - the task to execute.boolean isRunningOnMDThread()
java.lang.Object getService(java.lang.Class clazz)
clazz
- - the requested service.java.lang.Object getService(java.lang.String serviceName)
serviceName
- - the requested service.