Android detecting when lines have been connected during an outgoing call

后端 未结 2 814
独厮守ぢ
独厮守ぢ 2020-12-17 07:28

Just a quick background I\'m Running CM7 on a rooted Nexus one. I am trying to detect when an outgoing call is actually connected: has stopped ringing and the person you ar

2条回答
  •  自闭症患者
    2020-12-17 07:53

    I have looked into the code. It will always give null unless you instantiate a Phone object and set it as default Phone. But instantiating it needs some System permissions allowed only to system aps.

    By using this method: com.android.internal.telephony.PhoneFactory# public static void makeDefaultPhones(Context context) {

    http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.4_r1.2/com/android/internal/telephony/PhoneFactory.java

提交回复
热议问题