石田です、いつも参考にさせていただいてます。

標題の件ですが、自作ActivityやServiceの起動中は、電話着信を受けたときに即切断させたいのですが、うまくいかなくて悩んでいま
す。。
着信状態の取得には以下のようにPhoneStateListenerを使用しています。

public void onCallStateChanged(int state, String incomingNumber){
        switch(state){
                case TelephonyManager.CALL_STATE_RINGING:
                Toast.makeText(con.getApplicationContext(), "RINGING(" +
incoming_number + ")", Toast.LENGTH_LONG).show();
                // ここで電話を切りたい!!
                break;
        }
}

電話を切る方法について、お知恵をお貸しください!!
よろしくお願いします。m(_ _)m

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to