Call判斷正在通話

TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
if (tm.getCallState() != TelephonyManager.CALL_STATE_IDLE) {
    Toast.makeText(getApplicationContext(), R.string.in_call_play_error, Toast.LENGTH_SHORT).show();
     break;
}get

相關文章
相關標籤/搜索