在某些情況下,我不想聽我的手機狀態。 如何銷燬PhoneStateListener類的對象?如何銷燬PhoneStateListener類的對象?
我創建對象這樣
try {
phoneCallListener = new WnetPlayerPhoneCallListener();
TelephonyManager mTM = (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE);
mTM.listen(phoneCallListener, PhoneStateListener.LISTEN_CALL_STATE);
} catch(Exception e) {
Log.e("PhoneCallListener", "Exception: "+e.toString());
}
非常感謝Dan S – 2012-04-26 10:42:06