use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class TabBarModule method clearInfo.
@JSMethod(uiThread = true)
public void clearInfo() {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXEventCenter.EVENT_TABBAR_CLEARTABBARINFO);
weexEventBean.setContext(mWXSDKInstance.getContext());
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class TabBarModule method showBadge.
@JSMethod(uiThread = true)
public void showBadge(String params) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXEventCenter.EVENT_TABBAR_SHOWBADGE);
weexEventBean.setJsParams(params);
weexEventBean.setContext(mWXSDKInstance.getContext());
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class ToolModule method clearWatchNetworkStatus.
@JSMethod
public void clearWatchNetworkStatus() {
ConnectivityManager connectivityManager = ManagerFactory.getManagerService(ConnectivityManager.class);
connectivityManager.unregisterNetworkListener(BMWXEnvironment.mApplicationContext);
}
use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class ToolModule method copyString.
/**
* 复制字符串到粘贴板
*/
@JSMethod
public void copyString(String params, JSCallback callback) {
WeexEventBean weexEventBean = new WeexEventBean();
weexEventBean.setKey(WXEventCenter.EVENT_COPYSTRING);
weexEventBean.setContext(mWXSDKInstance.getContext());
weexEventBean.setJscallback(callback);
weexEventBean.setJsParams(params);
ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.
the class WebSocketModule method webSocket.
@JSMethod
public void webSocket(String url, String protocol) {
webSocketAdapter = mWXSDKInstance.getWXWebSocketAdapter();
Log.e("webSocket", "this>>>>>" + this + "id>>>>>" + mWXSDKInstance.getInstanceId());
if (!reportErrorIfNoAdapter()) {
LightlyWebSocketAdapter bmWebSocketAdapter = (LightlyWebSocketAdapter) webSocketAdapter;
bmWebSocketAdapter.connect(url, protocol, eventListener, mWXSDKInstance.getInstanceId());
}
}
Aggregations