@Override
public void onResume(){
super.onResume();
// Wifi broadcast Receiver
wifiReceiver = new WifiReceiver();
registerReceiver(wifiReceiver, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
wifiManager.startScan();
// Location Manager and Listener
if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER))
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, minimumSeconds * 1000, minimumDistance, locationListener);
// Telephony Manager and Listener
wakeLock.acquire();
telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_CELL_LOCATION |
PhoneStateListener.LISTEN_DATA_ACTIVITY | PhoneStateListener.LISTEN_DATA_CONNECTION_STATE |
PhoneStateListener.LISTEN_SERVICE_STATE | PhoneStateListener.LISTEN_SIGNAL_STRENGTHS
| PhoneStateListener.LISTEN_CALL_STATE);
// Phone and SIM information are static, i.e. not updated regularly but only here
updatePhoneSimInfo();
}
MainActivity.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:mobility-logger
作者:
评论列表
文章目录