use of com.eros.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class ModalModule method toast.
@JSMethod(uiThread = true)
public void toast(String options) {
WeexEventBean eventBean = new WeexEventBean();
eventBean.setContext(mWXSDKInstance.getContext());
eventBean.setKey(WXEventCenter.EVENT_MODAL_TOAST);
eventBean.setJsParams(options);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
use of com.eros.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class StorageModule method getData.
@JSMethod(uiThread = true)
public Object getData(String key, JSCallback callback) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXEventCenter.EVENT_GETDATA);
weexEventBean.setContext(mWXSDKInstance.getContext());
ArrayList<String> list = new ArrayList();
list.add(key);
weexEventBean.setParamsList(list);
weexEventBean.setJscallback(callback);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
return null;
}
use of com.eros.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class StorageModule method removeData.
@JSMethod(uiThread = true)
public Object removeData(JSCallback callback) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXEventCenter.EVENT_REMOVEDATA);
weexEventBean.setContext(mWXSDKInstance.getContext());
weexEventBean.setJscallback(callback);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
return null;
}
use of com.eros.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class AxiosModule method fetch.
@JSMethod(uiThread = false)
public void fetch(String params, final JSCallback jsCallback) {
WeexEventBean eventBean = new WeexEventBean();
eventBean.setContext(mWXSDKInstance.getContext());
eventBean.setKey(WXEventCenter.EVENT_FETCH);
eventBean.setJsParams(params);
eventBean.setJscallback(jsCallback);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
use of com.eros.framework.model.WeexEventBean in project WeexErosFramework by bmfe.
the class CameraModule 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);
}
Aggregations