use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class StorageModule method deleteData.
@JSMethod(uiThread = true)
public Object deleteData(String key, JSCallback callback) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXConstant.WXEventCenter.EVENT_DELETEDATA);
weexEventBean.setContext(mWXSDKInstance.getContext());
ArrayList<String> list = new ArrayList();
list.add(key);
weexEventBean.setParamsList(list);
weexEventBean.setJscallback(callback);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
return null;
}
use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class StorageModule method removeData.
@JSMethod(uiThread = true)
public Object removeData(JSCallback callback) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXConstant.WXEventCenter.EVENT_REMOVEDATA);
weexEventBean.setContext(mWXSDKInstance.getContext());
weexEventBean.setJscallback(callback);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
return null;
}
use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class StorageModule method deleteDataSync.
@JSMethod(uiThread = false)
public Object deleteDataSync(String key) {
ArrayList<String> list = new ArrayList();
list.add(key);
return new EventDeleteData().deleteDataSync(mWXSDKInstance.getContext(), list);
}
use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class StorageModule method getData.
@JSMethod(uiThread = true)
public Object getData(String key, JSCallback callback) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXConstant.WXEventCenter.EVENT_GETDATA);
weexEventBean.setContext(mWXSDKInstance.getContext());
ArrayList<String> list = new ArrayList();
list.add(key);
weexEventBean.setParamsList(list);
weexEventBean.setJscallback(callback);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
return null;
}
use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class StorageModule method setDataSync.
// 同步存取
@JSMethod(uiThread = false)
public Object setDataSync(String key, String value) {
ArrayList<String> list = new ArrayList();
list.add(key);
list.add(value);
return new EventSetData().setDataSync(mWXSDKInstance.getContext(), list);
}
Aggregations