use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class RouterModule method getParams.
@JSMethod(uiThread = true)
public void getParams(JSCallback callback) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setContext(mWXSDKInstance.getContext());
weexEventBean.setJscallback(callback);
weexEventBean.setKey(WXConstant.WXEventCenter.EVENT_GETPARAMS);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class RouterModule method toWebView.
@JSMethod
public void toWebView(String params) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXConstant.WXEventCenter.EVENT_TOWEBVIEW);
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 RouterModule method openBrowser.
@JSMethod(uiThread = true)
public void openBrowser(String params, JSCallback callback) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXConstant.WXEventCenter.EVENT_OPENBROWSER);
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 ShareModule method share.
@JSMethod
public void share(String params, JSCallback success, JSCallback fail) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXConstant.WXEventCenter.EVENT_SHARE);
weexEventBean.setContext(mWXSDKInstance.getContext());
weexEventBean.setJsParams(params);
ArrayList<JSCallback> callbacks = new ArrayList<>();
callbacks.add(success);
callbacks.add(fail);
weexEventBean.setCallbacks(callbacks);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
// if (params == null) {
// return;
// }
// ShareBean shareBean = BMJsonParsManager.parseObject(params, ShareBean.class);
// BMShareManager.getInstance().share((Activity) mWXSDKInstance.getContext(), shareBean,
// mWXSDKInstance.getContainerView(), success, fail);
}
use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class ShareModule method relayToCricle.
@JSMethod
public void relayToCricle(String params, JSCallback successCallback, JSCallback failedCallback) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXConstant.WXEventCenter.EVENT_RELAYTOCRICLE);
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);
}
Aggregations