Home > Mobile >  Millet mobile phone access to not call incomingnumber is null, strives for the great god
Millet mobile phone access to not call incomingnumber is null, strives for the great god

Time:10-16

The code is as follows:
@ Override
Public void onCallStateChanged (int, String incomingNumber) {

If (lastState==TelephonyManager. CALL_STATE_RINGING & amp; &
State==TelephonyManager. CALL_STATE_IDLE) {//the current status for free, but the last time for the ring, not call for judgment for
The d (" MainActivity ", "phone number:" + incomingNumber);
}
LastState=state;
Super. OnCallStateChanged (state, incomingNumber);
}

The Log print is as follows:
10:38:21 12-14, 607, 9291-9291/com. Smstest D/MainActivity: phone number:

Beg god to explain, don't appreciate

CodePudding user response:

The d (" MainActivity ", "phone number:" + incomingNumber); On the conditions outside the interview about

Whether CALL_STATE_IDLE is no number or permissions

CodePudding user response:

On the outside, like huawei mobile phones, is to get the incomingnumber, but millet mobile phone is Null, custom reason feel system?

CodePudding user response:

Yes, this is not clear, may I this millet, you go and ask the millet

CodePudding user response:

To solve the ah

CodePudding user response:

Hello, the problem you solve, I encountered this problem now, now I hand millet mobile phone can't get to incomingNumber 6, return is empty

CodePudding user response:

Need to get READ_CALL_LOG permissions (directory) can
  • Related