Intercept incoming call in a rooted Android (Jelly Bean)

Budimir Grom

I'm looking to intercept calls in order to block all calls from numbers not stored in Contacts and to avoid all sorts of notifications set by default Phone app – in status bar, on its icon (number of missed calls), etc.

All devices are Samsung Galaxy Core Duos, so I have Blocking mode as an undesirable way of blocking all calls from numbers not stored in Contacts. My main problem is finding a way to disable (avoid) aforementioned notifications. I know I can empty my call log, and I am doing it, but notifications stay, both in status bar and on icon. That being said, I believe either both or none can be solved.

Is there a way to do this for rooted devices running Jelly Bean?

Since there's no proper way of using abortBroadcast() in this case, as android.intent.action.PHONE_STATE is not being received via an ordered broadcast (no system's sendOrderedBroadcast() call, like with received short message, but plain old sendBroadcast() instead), all receivers must receive this intent "at the same time".

To make my goal possibly impossible, as far as I can see, things start happening even before the broadcast. Furthermore, nothing "legally receivable" happens before the call to sendBroadcast(), as thoroughly yet briefly described in this blog post. By the way, this post was submitted in 2009. Has anything related to this problem changed since then?

Is it possible to solve this using shell? If yes, how?

The code that's emptying call log is the following:

context.getContentResolver().delete(android.provider.CallLog.Calls.CONTENT_URI, null, null);

I have permissions needed (for instance: WRITE_CALL_LOG, READ_CONTACTS, WRITE_CONTACTS) and this works. Call log shows to be empty when I touch Phone app icon or status bar notification.

Budimir Grom

I solved it using this piece of code:

Runtime runtime = Runtime.getRuntime();
try
{
    runtime.exec("service call phone 5 \n");
}
catch (Exception e)
{
    e.printStackTrace();
}

It marks call as ended, instead of marking it as missed, and ended calls do not show notifications of any kind.

5が機能しない場合は、4、6、8などの他の数字を試してください。

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

How to Intercept incoming call in Mule

分類Dev

How to answer automatically and programatically an incoming call on android

分類Dev

Get incoming call number programmatically on android 10

分類Dev

How to read the number of incoming call on Android Device

分類Dev

IntentServiceはAndroid4.2(Jelly Bean)でバグがありますか?

分類Dev

Android Jelly Beanにはまだ1.6が必要ですか?

分類Dev

Check if Android device is rooted or not

分類Dev

ルート化されたAndroid(Jelly Bean)で着信を傍受する

分類Dev

How to get incoming call's network(carrier) details in android

分類Dev

Intercept/capture incoming traffic to pods/services in Kubernetes

分類Dev

オプションがない場合、Android Jelly Bean電話をマウントする方法は?

分類Dev

Android:Jelly BeanのWebViewでプログラム的にテキスト選択モードをトリガーする

分類Dev

Android(Jelly Bean)が追加のRecognizerIntent(Kõnele)を無視するのはなぜですか?

分類Dev

PopUp while receiving Incoming Call

分類Dev

Twilio add incoming call to queue and call to the agent

分類Dev

Android – Listen For Incoming SMS Messages

分類Dev

Get event for incoming call when application in background

分類Dev

How to achieve a "contact" button on incoming call screen

分類Dev

Windows 8.1 detect incoming phone call

分類Dev

Make Status bar Translucent on pre lollipop devices(kit-kat) while being compatible with jelly bean

分類Dev

Jelly Bean DatePickerDialog ---キャンセルする方法はありますか?

分類Dev

Audio not working when incoming call is answered during screen is locked - swift

分類Dev

How to redirect already answered incoming call using pjsip?

分類Dev

How to intercept call and serve back JSON file dynamically (without "import")

分類Dev

How to install the apk silently from another application for non rooted device in android

分類Dev

Jelly Bean用のCordovaアプリを開発するにはどうすればよいですか?

分類Dev

If Spring can successfully intercept intra class function calls in a @Configuration class, why does it not support it in a regular bean?

分類Dev

アプリケーションデータの使用状況を取得する際に、Jelly BeanおよびJelly Beanより後のバージョンを実行しているデバイスのケータリング

分類Dev

Error running exec(). Command: Working Directory: null Environment: null - how to execute a binary in Android correctly on a non-rooted device?

Related 関連記事

  1. 1

    How to Intercept incoming call in Mule

  2. 2

    How to answer automatically and programatically an incoming call on android

  3. 3

    Get incoming call number programmatically on android 10

  4. 4

    How to read the number of incoming call on Android Device

  5. 5

    IntentServiceはAndroid4.2(Jelly Bean)でバグがありますか?

  6. 6

    Android Jelly Beanにはまだ1.6が必要ですか?

  7. 7

    Check if Android device is rooted or not

  8. 8

    ルート化されたAndroid(Jelly Bean)で着信を傍受する

  9. 9

    How to get incoming call's network(carrier) details in android

  10. 10

    Intercept/capture incoming traffic to pods/services in Kubernetes

  11. 11

    オプションがない場合、Android Jelly Bean電話をマウントする方法は?

  12. 12

    Android:Jelly BeanのWebViewでプログラム的にテキスト選択モードをトリガーする

  13. 13

    Android(Jelly Bean)が追加のRecognizerIntent(Kõnele)を無視するのはなぜですか?

  14. 14

    PopUp while receiving Incoming Call

  15. 15

    Twilio add incoming call to queue and call to the agent

  16. 16

    Android – Listen For Incoming SMS Messages

  17. 17

    Get event for incoming call when application in background

  18. 18

    How to achieve a "contact" button on incoming call screen

  19. 19

    Windows 8.1 detect incoming phone call

  20. 20

    Make Status bar Translucent on pre lollipop devices(kit-kat) while being compatible with jelly bean

  21. 21

    Jelly Bean DatePickerDialog ---キャンセルする方法はありますか?

  22. 22

    Audio not working when incoming call is answered during screen is locked - swift

  23. 23

    How to redirect already answered incoming call using pjsip?

  24. 24

    How to intercept call and serve back JSON file dynamically (without "import")

  25. 25

    How to install the apk silently from another application for non rooted device in android

  26. 26

    Jelly Bean用のCordovaアプリを開発するにはどうすればよいですか?

  27. 27

    If Spring can successfully intercept intra class function calls in a @Configuration class, why does it not support it in a regular bean?

  28. 28

    アプリケーションデータの使用状況を取得する際に、Jelly BeanおよびJelly Beanより後のバージョンを実行しているデバイスのケータリング

  29. 29

    Error running exec(). Command: Working Directory: null Environment: null - how to execute a binary in Android correctly on a non-rooted device?

ホットタグ

アーカイブ