常见错误码分类
1 断开原因错误码
1.1 android.telephony.DisconnectCause
描述
/**
* Describes the cause of a disconnected call. Those disconnect causes can be converted into a more
* generic {@link android.telecom.DisconnectCause} object.
*/
示例
/** The disconnect cause is not valid (Not received a disconnect cause) */
public static final int NOT_VALID = -1;
/** Has not yet disconnected */
public static final int NOT_DISCONNECTED = 0;
/** An incoming call that was missed and never answered */
public static final int INCOMING_MISSED = 1;
/** Normal; Remote hangup*/
public static final int NORMAL = 2;
/** Normal; Local hangup */
public static final int LOCAL = 3;
/** Outgoing call to busy line */
public static final int BUSY = 4;
/** Outgoing call to congested network */
public static final int CONGESTION = 5;
/** Not presently used */
public static final int MMI = 6;
/** Invalid dial string */
public static final int INVALID_NUMBER = 7;
/** Cannot reach the peer */
public static final int NUMBER_UNREACHABLE = 8;
/** Cannot reach the server */
public static final int SERVER_UNREACHABLE = 9;
/** Invalid credentials */
public static final int INVALID_CREDENTIALS = 10;
/** Calling from out of network is not allowed */
public static final int OUT_OF_NETWORK = 11;
/** Server error */
public static final int SERVER_ERROR = 12;
/** Client timed out */
public static final int TIMED_OUT = 13;
/** Client went out of network range */
public static final int LOST_SIGNAL = 14;
/** GSM or CDMA ACM limit exceeded */
public static final int LIMIT_EXCEEDED = 15;
/** An incoming call that was rejected */
public static final int INCOMING_REJECTED = 16;
/** Radio is turned off explicitly */
public static final int POWER_OFF = 17;
/** Out of service */
public static final int OUT_OF_SERVICE = 18;
/** No ICC, ICC locked, or other ICC error */
public static final int ICC_ERROR = 19;
/** Call was blocked by call barring */
public static final int CALL_BARRED = 20;
...
/**
* Indicates that incoming call was rejected by the modem before the call went in ringing
*/
public static final int INCOMING_AUTO_REJECTED = 81;
这里只是给出部分Causes,详情请看android.telephony.DisconnectCause。