Search in sources :

Example 6 with WeexEventBean

use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.

the class CommunicationModule method call.

@JSMethod
public void call(String params) {
    WeexEventBean weexEventBean = new WeexEventBean();
    weexEventBean.setKey(WXConstant.WXEventCenter.EVENT_CALL);
    weexEventBean.setContext(mWXSDKInstance.getContext());
    weexEventBean.setJsParams(params);
    ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
Also used : WeexEventBean(com.benmu.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 7 with WeexEventBean

use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.

the class ImageModule method camera.

@JSMethod
public void camera(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);
}
Also used : WeexEventBean(com.benmu.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 8 with WeexEventBean

use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.

the class ImageModule 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);
}
Also used : WeexEventBean(com.benmu.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 9 with WeexEventBean

use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.

the class ImageModule method pick.

@JSMethod(uiThread = true)
public void pick(String params, JSCallback jsCallback) {
    WeexEventBean eventBean = new WeexEventBean();
    eventBean.setContext(mWXSDKInstance.getContext());
    eventBean.setKey(WXConstant.WXEventCenter.EVENT_IMAGE_PICK);
    eventBean.setJsParams(params);
    eventBean.setJscallback(jsCallback);
    ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
Also used : WeexEventBean(com.benmu.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 10 with WeexEventBean

use of com.benmu.framework.model.WeexEventBean in project WeexErosFramework by bmfe.

the class ModalModule method showLoading.

@JSMethod(uiThread = true)
public void showLoading(String options, JSCallback callback) {
    WeexEventBean eventBean = new WeexEventBean();
    eventBean.setContext(mWXSDKInstance.getContext());
    eventBean.setKey(WXConstant.WXEventCenter.EVENT_MODAL_SHOWLOADING);
    eventBean.setJsParams(options);
    eventBean.setJscallback(callback);
    ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
Also used : WeexEventBean(com.benmu.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Aggregations

WeexEventBean (com.benmu.framework.model.WeexEventBean)51 JSMethod (com.taobao.weex.annotation.JSMethod)50 ArrayList (java.util.ArrayList)8 JSCallback (com.taobao.weex.bridge.JSCallback)5 DialogInterface (android.content.DialogInterface)1 Intent (android.content.Intent)1 DispatchEventManager (com.benmu.framework.manager.impl.dispatcher.DispatchEventManager)1