Search in sources :

Example 41 with WeexEventBean

use of com.eros.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(WXEventCenter.EVENT_CAMERA);
                dispatchEventManager.getBus().post(eventBean);
            // connectionDebugService(BMWXEnvironment.mPlatformConfig.getUrl()
            // .getDebugServer());
            }
        }
    });
    builder.create().show();
}
Also used : DialogInterface(android.content.DialogInterface) WeexEventBean(com.eros.framework.model.WeexEventBean) Intent(android.content.Intent) DispatchEventManager(com.eros.framework.manager.impl.dispatcher.DispatchEventManager)

Example 42 with WeexEventBean

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

the class CommunicationModule method contacts.

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

Example 43 with WeexEventBean

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

Example 44 with WeexEventBean

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

the class GeolocationModule method getGeolocation.

@JSMethod(uiThread = true)
public void getGeolocation(JSCallback callback) {
    WeexEventBean eventBean = new WeexEventBean();
    eventBean.setContext(mWXSDKInstance.getContext());
    eventBean.setKey(WXEventCenter.EVENT_GEOLOCATION_GET);
    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 45 with WeexEventBean

use of com.eros.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(WXEventCenter.EVENT_MODAL_SHOWLOADING);
    eventBean.setJsParams(options);
    eventBean.setJscallback(callback);
    ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
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