public class CoreAndroid extends CordovaPlugin
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PLUGIN_NAME |
protected static java.lang.String |
TAG |
cordova, preferences, webView| Constructor and Description |
|---|
CoreAndroid() |
| Modifier and Type | Method and Description |
|---|---|
void |
backHistory()
Go to previous page displayed.
|
void |
clearCache()
Clear the resource cache.
|
void |
clearHistory()
Clear page history for the app.
|
boolean |
execute(java.lang.String action,
org.json.JSONArray args,
CallbackContext callbackContext)
Executes the request and returns PluginResult.
|
void |
exitApp()
Exit the Android application.
|
void |
fireJavascriptEvent(java.lang.String action)
Send an event to be fired on the Javascript side.
|
static java.lang.Object |
getBuildConfigValue(android.content.Context ctx,
java.lang.String key) |
boolean |
isBackbuttonOverridden()
Return whether the Android back button is overridden by the user.
|
void |
loadUrl(java.lang.String url,
org.json.JSONObject props)
Load the url into the webview.
|
void |
onDestroy()
The final call you receive before your activity is destroyed.
|
void |
overrideBackbutton(boolean override)
Override the default behavior of the Android back button.
|
void |
overrideButton(java.lang.String button,
boolean override)
Override the default behavior of the Android volume buttons.
|
void |
pluginInitialize()
Sets the context of the Command.
|
void |
sendResumeEvent(PluginResult resumeEvent)
Used to send the resume event in the case that the Activity is destroyed by the OS
|
execute, execute, fromPluginUri, getServiceName, handleOpenForRead, hasPermisssion, initialize, onActivityResult, onConfigurationChanged, onMessage, onNewIntent, onOverrideUrlLoading, onPause, onReceivedClientCertRequest, onReceivedHttpAuthRequest, onRequestPermissionResult, onReset, onRestoreStateForActivityResult, onResume, onSaveInstanceState, onStart, onStop, privateInitialize, remapUri, requestPermissions, shouldAllowBridgeAccess, shouldAllowNavigation, shouldAllowRequest, shouldOpenExternalUrl, toPluginUripublic static final java.lang.String PLUGIN_NAME
protected static final java.lang.String TAG
public void fireJavascriptEvent(java.lang.String action)
action - The name of the event to be firedpublic void pluginInitialize()
pluginInitialize in class CordovaPluginpublic boolean execute(java.lang.String action,
org.json.JSONArray args,
CallbackContext callbackContext)
throws org.json.JSONException
execute in class CordovaPluginaction - The action to execute.args - JSONArry of arguments for the plugin.callbackContext - The callback context from which we were invoked.org.json.JSONExceptionpublic void clearCache()
public void loadUrl(java.lang.String url,
org.json.JSONObject props)
throws org.json.JSONException
url - props - Properties that can be passed in to the Cordova activity (i.e. loadingDialog, wait, ...)org.json.JSONExceptionpublic void clearHistory()
public void backHistory()
public void overrideBackbutton(boolean override)
override - T=override, F=cancel overridepublic void overrideButton(java.lang.String button,
boolean override)
button - volumeup, volumedownoverride - T=override, F=cancel overridepublic boolean isBackbuttonOverridden()
public void exitApp()
public void onDestroy()
CordovaPluginonDestroy in class CordovaPluginpublic void sendResumeEvent(PluginResult resumeEvent)
resumeEvent - PluginResult containing the payload for the resume event to be firedpublic static java.lang.Object getBuildConfigValue(android.content.Context ctx,
java.lang.String key)