use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class RouterModule method back.
@JSMethod(uiThread = true)
public void back(String params, JSCallback callback) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXConstant.WXEventCenter.EVENT_BACK);
weexEventBean.setContext(mWXSDKInstance.getContext());
weexEventBean.setJsParams(params);
weexEventBean.setJscallback(callback);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class RouterModule method nav.
@JSMethod(uiThread = true)
public void nav(String params) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXConstant.WXEventCenter.EVENT_NAV);
weexEventBean.setContext(mWXSDKInstance.getContext());
weexEventBean.setJsParams(params);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class ShareModule method relayToFriend.
@JSMethod
public void relayToFriend(String params, JSCallback successCallback, JSCallback failedCallback) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXConstant.WXEventCenter.EVENT_RELAYTOFRIEND);
weexEventBean.setContext(mWXSDKInstance.getContext());
weexEventBean.setJsParams(params);
ArrayList<JSCallback> callbacks = new ArrayList<>();
callbacks.add(successCallback);
callbacks.add(failedCallback);
weexEventBean.setCallbacks(callbacks);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class StorageModule method setData.
@JSMethod(uiThread = true)
public Object setData(String key, String value, JSCallback callback) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXConstant.WXEventCenter.EVENT_SETDATA);
weexEventBean.setContext(mWXSDKInstance.getContext());
ArrayList<String> list = new ArrayList();
list.add(key);
list.add(value);
weexEventBean.setParamsList(list);
weexEventBean.setJscallback(callback);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
return null;
}
use of com.benmu.framework.model.WeexEventBean 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;
}
Aggregations