Search in sources :

Example 91 with JSMethod

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);
}
Also used : WeexEventBean(com.eros.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 92 with JSMethod

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);
}
Also used : WeexEventBean(com.eros.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 93 with JSMethod

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);
}
Also used : ConnectivityManager(com.eros.framework.manager.impl.ConnectivityManager) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 94 with JSMethod

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);
}
Also used : WeexEventBean(com.eros.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 95 with JSMethod

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());
    }
}
Also used : LightlyWebSocketAdapter(com.eros.framework.extend.adapter.LightlyWebSocketAdapter) JSMethod(com.taobao.weex.annotation.JSMethod)

Aggregations

JSMethod (com.taobao.weex.annotation.JSMethod)198 WeexEventBean (com.eros.framework.model.WeexEventBean)53 WeexEventBean (com.benmu.framework.model.WeexEventBean)50 JSONObject (com.alibaba.fastjson.JSONObject)32 ArrayList (java.util.ArrayList)25 HashMap (java.util.HashMap)20 Intent (android.content.Intent)19 JSCallback (com.taobao.weex.bridge.JSCallback)12 Activity (android.app.Activity)11 WXEditText (com.taobao.weex.ui.view.WXEditText)8 Map (java.util.Map)8 Uri (android.net.Uri)7 AlertDialog (android.app.AlertDialog)6 Context (android.content.Context)6 DialogInterface (android.content.DialogInterface)6 OnClickListener (android.content.DialogInterface.OnClickListener)6 EditText (android.widget.EditText)6 JSONException (com.alibaba.fastjson.JSONException)6 Invoker (com.taobao.weex.bridge.Invoker)5 MethodInvoker (com.taobao.weex.bridge.MethodInvoker)5