public class AlertPlugin
extends java.lang.Object
Example :
scmobile.notification.alert('Normal alert', 'message content', alertCallback, 'button cancel, button ok, button 3, button 4');
Modifier and Type | Field and Description |
---|---|
protected android.content.Context |
mContext |
protected java.lang.String |
mPluginId |
protected net.sitecore.android.sdk.web.ScPluginManager |
mPluginManager |
Constructor and Description |
---|
AlertPlugin() |
Modifier and Type | Method and Description |
---|---|
void |
exec(java.lang.String method,
net.sitecore.android.sdk.web.ScParams params,
net.sitecore.android.sdk.web.ScCallbackContext callbackContext)
Shows alert dialog.
|
java.lang.String |
getPluginJsCode()
Returns javascript code that will be attached to the page.
|
java.lang.String |
getPluginName()
Returns plugin name.
|
void |
init(android.content.Context context,
net.sitecore.android.sdk.web.ScPluginManager pluginManager)
Base constructor.
|
protected void |
onActivityResult(int requestCode,
int resultCode,
android.content.Intent data) |
void |
onPause() |
void |
onResume() |
void |
restoreState(android.os.Bundle savedState)
Loads settings of dialog.
|
void |
saveState(android.os.Bundle outState)
Saves current settings of dialog.
|
void |
setPluginId(java.lang.String pluginId)
Specifies plugin's id.
|
void |
startActivityForResult(android.content.Intent intent,
int requestCode) |
protected android.content.Context mContext
protected net.sitecore.android.sdk.web.ScPluginManager mPluginManager
protected java.lang.String mPluginId
public java.lang.String getPluginName()
String
plugin name.public java.lang.String getPluginJsCode()
This code defines what functionality of this plugin we will use from our page.
String
js code.public void exec(java.lang.String method, net.sitecore.android.sdk.web.ScParams params, net.sitecore.android.sdk.web.ScCallbackContext callbackContext) throws org.json.JSONException
method
- String
method name.params
- ScParams
params that will be used by action.callbackContext
- ScCallbackContext
callback for action.org.json.JSONException
- if execution fails.ScPluginManager
public void onPause()
public void saveState(android.os.Bundle outState)
outState
- current state.public void restoreState(android.os.Bundle savedState)
savedState
- saved state.public void init(android.content.Context context, net.sitecore.android.sdk.web.ScPluginManager pluginManager)
context
- current context.pluginManager
- ScPluginManager
instance.public void startActivityForResult(android.content.Intent intent, int requestCode)
protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data)
public void onResume()
public void setPluginId(java.lang.String pluginId)
pluginId
- String
plugin's id.