public void startTracking(){
mTelephonyManager = (TelephonyManager) getBaseContext().getSystemService(Context.TELEPHONY_SERVICE);
/* Check if it is a CDMA phone */
if(mTelephonyManager.getPhoneType() != TelephonyManager.PHONE_TYPE_CDMA) {
tv1 = (TextView) findViewById(R.id.err_msg);
tv1.setText("This application can detect a femtocell on a CDMA phone only.");
return;
}
mListener = new PhoneStateListener() {
public void onServiceStateChanged(ServiceState s){
Log.d(TAG, "Service State changed!");
getServiceStateInfo(s);
}
};
mTelephonyManager.listen(mListener, PhoneStateListener.LISTEN_CELL_LOCATION);
mTelephonyManager.listen(mListener, PhoneStateListener.LISTEN_SERVICE_STATE);
}
MainActivity.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:femtocatcher
作者:
评论列表
文章目录