Search in sources :

Example 1 with ConnectivityManager

use of com.eros.framework.manager.impl.ConnectivityManager 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 2 with ConnectivityManager

use of com.eros.framework.manager.impl.ConnectivityManager in project WeexErosFramework by bmfe.

the class ToolModule method watchNetworkStatus.

@JSMethod
public void watchNetworkStatus(JSCallback callback) {
    ConnectivityManager connectivityManager = ManagerFactory.getManagerService(ConnectivityManager.class);
    connectivityManager.registerNetworkListener(BMWXEnvironment.mApplicationContext, callback);
}
Also used : ConnectivityManager(com.eros.framework.manager.impl.ConnectivityManager) JSMethod(com.taobao.weex.annotation.JSMethod)

Aggregations

ConnectivityManager (com.eros.framework.manager.impl.ConnectivityManager)2 JSMethod (com.taobao.weex.annotation.JSMethod)2