NEW_OUTGOING_CALL not called on Samsung Galaxy S

Trying to intercept outgoing calls and have a good solution for

  • nexus 1 stock android 2.2
  • HTC Desire 2.2
  • Moto defy 2.1

But 2.1 doesn’t work on the Samsung Galaxy S, has anyone seen this?

<receiver android:name="com.mypackge.OutGoingCallDetection" android:exported="true"> <intent-filter> <action android:name="android.intent.action.NEW_OUTGOING_CALL" android:priority="0" /> </intent-filter> </receiver> <uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" /> 

Update: PROCESS_OUTGOING_CALLS is added.

Receiver:

 public class OutGoingCallDetection extends BroadcastReceiver { private static final String TAG = "OutGoingCallDetection"; @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); Log.d(TAG, "onReceive, Action:" +intent.getAction()); } } 
+4
source share
4 answers

Try putting the manifest in the order suggested by Google Dev: Manifest.xml

Like this:

 <uses-permission /> ... <receiver> <intent-filter> . . . </intent-filter> <meta-data /> </receiver> 

There may be a problem in how some devices analyze the manifest and may not properly register the receiver.

EDIT: Starting with ADT 16, Lint will tell you that your permissions are in the wrong place, so I assume this should be more of a problem than previously thought

Greetings

+5
source

You need to add user permission:

 <uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" /> 

See this blog post for an example of how to set up and use NEW_OUTGOING_CALL.

Also see this blog post on how to set android:priority to.

+5
source

Have you tried increasing android:priority ? Let them say up to 10,000.

I intercepted incoming SMS ', and raising the android:priority attribute was useful

0
source

I created a software listener. It is working fine. For reference.

 IntentFilter filter = new IntentFilter(); filter.addAction("android.intent.action.NEW_OUTGOING_CALL"); receiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); Log.d(TAG, "onReceive, Action:" +intent.getAction()); } }; registerReceiver(receiver, filter); 
0
source

All Articles