public class StandardFeature extends BaseFeature implements IReflectAble
BaseFeature
,亦可方便监听Activity生命周期。简单模拟QQ登陆作为示例讲解用法,代码如下:IReflectAble
接口类,并在proguard.cfg中添加配置行 -keep public class * extends io.dcloud.DHInterface.IReflectAbleBaseFeature.BaseModule
ISysEventListener.SysEventType
F_ACCELEROMETER, F_AUDIO, F_BARCODE, F_CAMERA, F_CONSOLE, F_CONTACTS, F_DEVICE, F_DOWNLOADER, F_EVENTS, F_FILE, F_GALLERY, F_GEOLOCATION, F_INVOCATION, F_MAPS, F_MESSAGING, F_ORIENTATION, F_PAYMENT, F_PROXIMITY, F_PUSH, F_RUNTIME, F_SHARE, F_SPEECH, F_SPLASHSCREEN, F_STATISTIC, F_STORAGE, F_UI, F_XMLHTTPREQUEST, F_ZIP
构造器和说明 |
---|
StandardFeature() |
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
execute(IWebview pWebViewImpl,
java.lang.String pActionName,
JSONArray pJsArgs)
扩展js,java内部实现逻辑,通过传入的pActionName参数区分使用不同的函数处理
|
void |
init(AbsMgr pFeatureMgr,
java.lang.String pFeatureName)
实现类初始化时调用
|
dispose, doHandleAction, getBaseModuleById, loadModules, onExecute, onPause, onReceiver, onResume, onStart, onStop, registerSysEvent, registerSysEvent, unregisterSysEvent, unregisterSysEvent
public final java.lang.String execute(IWebview pWebViewImpl, java.lang.String pActionName, JSONArray pJsArgs)
BaseFeature
execute
在接口中 IFeature
execute
在类中 BaseFeature
pWebViewImpl
- 当前执行脚本的页面pActionName
- 执行事件代号pJsArgs
- 执行事件所需参数