功能
Intercept network state changes and update linphone core through LinphoneManger
翻译
拦截网络状态的变化,并通过LinphoneManger更新linphone核心内容。
NetworkManager.java
/**
*
* Intercept network state changes and update linphone core through LinphoneManager.
*
*/
public class NetworkManager extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
Boolean lNoConnectivity = intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY,false);
if (LinphoneManager.isInstanciated()) {
LinphoneManager.getInstance().connectivityChanged(cm, lNoConnectivity);
}
}
}