NEW_OUTGOING_CALL not being called on Samsung Galaxy S

后端 未结 4 1585
攒了一身酷
攒了一身酷 2021-01-13 10:00

Trying to intercept outgoing calls, and have a solution working well on

  • nexus 1 stock android 2.2
  • HTC desire 2.2
  • Moto defy 2.1
4条回答
  •  孤独总比滥情好
    2021-01-13 10:43

    I created the broadcast listener programmatically. It works fine. For your 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);
    

提交回复
热议问题