public interface CordovaInterface
Modifier and Type | Method and Description |
---|---|
android.app.Activity |
getActivity()
Get the Android activity.
|
java.util.concurrent.ExecutorService |
getThreadPool()
Returns a shared thread pool that can be used for background tasks.
|
boolean |
hasPermission(java.lang.String permission)
Check for a permission.
|
java.lang.Object |
onMessage(java.lang.String id,
java.lang.Object data)
Called when a message is sent to plugin.
|
void |
requestPermission(CordovaPlugin plugin,
int requestCode,
java.lang.String permission)
Sends a permission request to the activity for one permission.
|
void |
requestPermissions(CordovaPlugin plugin,
int requestCode,
java.lang.String[] permissions)
Sends a permission request to the activity for a group of permissions
|
void |
setActivityResultCallback(CordovaPlugin plugin)
Set the plugin to be called when a sub-activity exits.
|
void |
startActivityForResult(CordovaPlugin command,
android.content.Intent intent,
int requestCode)
Launch an activity for which you would like a result when it finished.
|
void startActivityForResult(CordovaPlugin command, android.content.Intent intent, int requestCode)
command
- The command objectintent
- The intent to startrequestCode
- The request code that is passed to callback to identify the activityvoid setActivityResultCallback(CordovaPlugin plugin)
plugin
- The plugin on which onActivityResult is to be calledandroid.app.Activity getActivity()
java.lang.Object onMessage(java.lang.String id, java.lang.Object data)
id
- The message iddata
- The message datajava.util.concurrent.ExecutorService getThreadPool()
void requestPermission(CordovaPlugin plugin, int requestCode, java.lang.String permission)
void requestPermissions(CordovaPlugin plugin, int requestCode, java.lang.String[] permissions)
boolean hasPermission(java.lang.String permission)