package com.example.br;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class PhoneBroadcastReceiver extends BroadcastReceiver {
    private static String TAG = "PhoneBroadcastReceiver";

    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction()
                .equals(Intent.ACTION_NEW_OUTGOING_CALL)) {
            String phoneNumber =
                    intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
            Log.v(TAG, "Outgoing Call: " + phoneNumber);
        }
    }
}