use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class WeChatLoginModule method wechat.
@JSMethod
public void wechat(String parameterString, JSCallback callback) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXConstant.WXEventCenter.EVENT_WECHATLOGIN);
weexEventBean.setContext(mWXSDKInstance.getContext());
weexEventBean.setJscallback(callback);
weexEventBean.setJsParams(parameterString);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class AbstractWeexActivity method debugLayerClick.
private void debugLayerClick() {
android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(mAct);
builder.setItems(mDebugOptions, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (which == 0) {
Intent intent = new Intent(mAct, DebugActivity.class);
startActivity(intent);
} else if (which == 1) {
refresh();
} else if (which == 2) {
DispatchEventManager dispatchEventManager = ManagerFactory.getManagerService(DispatchEventManager.class);
WeexEventBean eventBean = new WeexEventBean();
eventBean.setContext(mAct);
eventBean.setKey(WXConstant.WXEventCenter.EVENT_CAMERA);
dispatchEventManager.getBus().post(eventBean);
// connectionDebugService(BMWXEnvironment.mPlatformConfig.getUrl()
// .getDebugServer());
}
}
});
builder.create().show();
}
use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class AxiosModule method uploadImage.
@JSMethod
public void uploadImage(String params, final JSCallback jsCallback) {
WeexEventBean eventBean = new WeexEventBean();
eventBean.setContext(mWXSDKInstance.getContext());
eventBean.setKey(WXConstant.WXEventCenter.EVENT_IMAGE_UPLOAD);
eventBean.setJsParams(params);
eventBean.setJscallback(jsCallback);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class CameraModule method cameraUpload.
@JSMethod
public void cameraUpload(String params, JSCallback jsCallback) {
WeexEventBean eventBean = new WeexEventBean();
eventBean.setContext(mWXSDKInstance.getContext());
eventBean.setKey(WXConstant.WXEventCenter.EVENT_CAMERA_PATH);
eventBean.setJsParams(params);
eventBean.setJscallback(jsCallback);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class CameraModule method uploadImage.
@JSMethod
public void uploadImage(String params, JSCallback jsCallback) {
WeexEventBean eventBean = new WeexEventBean();
eventBean.setContext(mWXSDKInstance.getContext());
eventBean.setKey(WXConstant.WXEventCenter.EVENT_CAMERA_UPLOADIMAGE);
eventBean.setJsParams(params);
eventBean.setJscallback(jsCallback);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
Aggregations