Its not very useful as is but can be used for example to stop a call when roaming and add the required prefix for ringing internationally
Using java Syntax Highlighting
- public void monitorOutgoingCalls(){
- callRcv = new BroadcastReceiver(){
- public void onReceive(Context context, Intent intent) {
- String action = intent.getAction();
- if (Intent.ACTION_NEW_OUTGOING_CALL.equals(action)) {
- String number = getResultData();
- setResultData(null);
- Log.d("CALL MONITOR", "Outgoing call logged");
- addCall(number, "2", 0);
- }
- }
- };
- registerReceiver(callRcv, new IntentFilter(Intent.ACTION_NEW_OUTGOING_CALL));
- }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4




