1. 程式人生 > >Android 獲取當前連線 Cid和lac

Android 獲取當前連線 Cid和lac

 
mPhoneStateReceiver =newPhoneStateIntentReceiver(this,newServiceStateHandler());
mPhoneStateReceiver.notifyServiceState(MY_NOTIFICATION_ID);
mPhoneStateReceiver.notifyPhoneCallState(MY_NOTIFICATION_ID);
mPhoneStateReceiver.notifySignalStrength(MY_NOTIFICATION_ID);
mPhoneStateReceiver.registerIntent();
privateclassServiceStateHandlerextendsHandler{publicvoid handleMessage(Message msg){switch(msg.what){case MY_NOTIFICATION_ID:ServiceState state = mPhoneStateReceiver.getServiceState();System.out.println(state.getCid());System.out.println(state.getLac());System.out.println(mPhoneStateReceiver.getSignalStrength
());break;}}}