Search in sources :

Example 26 with WeexEventBean

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

the class ToolModule method scan.

@JSMethod(uiThread = true)
public void scan(JSCallback callback) {
    WeexEventBean eventBean = new WeexEventBean();
    eventBean.setContext(mWXSDKInstance.getContext());
    eventBean.setKey(WXEventCenter.EVENT_CAMERA);
    eventBean.setJscallback(callback);
    ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
Also used : WeexEventBean(com.eros.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 27 with WeexEventBean

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

the class BrowserImgModule method open.

@JSMethod(uiThread = true)
public void open(String json) {
    WeexEventBean eventBean = new WeexEventBean();
    eventBean.setContext(mWXSDKInstance.getContext());
    eventBean.setKey(WXEventCenter.EVENT_BROWSERIMG);
    eventBean.setJsParams(json);
    ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
Also used : WeexEventBean(com.eros.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 28 with WeexEventBean

use of com.eros.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(WXEventCenter.EVENT_IMAGE_PICK);
    eventBean.setJsParams(params);
    eventBean.setJscallback(jsCallback);
    ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
Also used : WeexEventBean(com.eros.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 29 with WeexEventBean

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

the class ImageModule method uploadScreenshot.

@JSMethod(uiThread = true)
public void uploadScreenshot(JSCallback callback) {
    WeexEventBean eventBean = new WeexEventBean();
    eventBean.setContext(mWXSDKInstance.getContext());
    eventBean.setKey(WXEventCenter.EVENT_CAMERA_UPLOADSCREENSHOT);
    eventBean.setJscallback(callback);
    ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
Also used : WeexEventBean(com.eros.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 30 with WeexEventBean

use of com.eros.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(WXEventCenter.EVENT_BACK);
    weexEventBean.setContext(mWXSDKInstance.getContext());
    weexEventBean.setJsParams(params);
    weexEventBean.setJscallback(callback);
    ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
Also used : WeexEventBean(com.eros.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Aggregations

WeexEventBean (com.eros.framework.model.WeexEventBean)55 JSMethod (com.taobao.weex.annotation.JSMethod)53 ArrayList (java.util.ArrayList)5 DispatchEventManager (com.eros.framework.manager.impl.dispatcher.DispatchEventManager)2 JSCallback (com.taobao.weex.bridge.JSCallback)2 DialogInterface (android.content.DialogInterface)1 Intent (android.content.Intent)1 RouterModel (com.eros.framework.model.RouterModel)1