use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class AxiosModule method uploadImage.
@JSMethod
public void uploadImage(String params, final JSCallback jsCallback) {
WeexEventBean eventBean = new WeexEventBean();
eventBean.setContext(mWXSDKInstance.getContext());
eventBean.setKey(WXConstant.WXEventCenter.EVENT_IMAGE_UPLOAD);
eventBean.setJsParams(params);
eventBean.setJscallback(jsCallback);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class CameraModule method cameraUpload.
@JSMethod
public void cameraUpload(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);
}
use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class CameraModule 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);
}
use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class CommunicationModule method contacts.
@JSMethod
public void contacts(JSCallback callback) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXConstant.WXEventCenter.EVENT_COMMUNICATION_CONTACTS);
weexEventBean.setContext(mWXSDKInstance.getContext());
weexEventBean.setJscallback(callback);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class EventModule method off.
@JSMethod
public void off(String type, JSCallback callback) {
if (!TextUtils.isEmpty(type) && callback != null) {
Intent off = new Intent(WXConstant.WXEventCenter.EVENT_JS_OFF);
off.putExtra("data", new EventCenter.Off(type, callback));
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(off);
}
}
Aggregations