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();
}
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);
}
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);
}
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);
}
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);
}
Aggregations