-1

This is primarily for my Work place so having an app running all the time is not an issue.

The question How do i attach a hook to activate the App or background process when a call is made, and can it retrieve the phone number?

All the App has to do is send a request with the phone number to a server in-house

The reason for the question:

I am toying with the idea of creating a Support Service module which can give the Service worker a better grasp of the problem at hand.

Consider this:

  1. Customer calls the company's support line
  2. Service worker picks up phone
  3. The computer looks up the Customers phone number on the Company's database and gives the Service Worker every detail they have on the customer ( Issues created, Website, Basic Info )

The biggest problem i can see is how do i Catch the number coming from the phone?

Looking up a customer via their phone number is not the issue.

Alternatively the Service worker will have to manually enter the phone number, but would be a nice feature to do it automatically.

WebKenth
  • 126
  • 1
  • 1
  • 9
  • 3
    Possible duplicate of [How to get phone number from an incoming call?](https://stackoverflow.com/questions/13154445/how-to-get-phone-number-from-an-incoming-call) – AskNilesh Feb 22 '18 at 09:34

1 Answers1

1

Yes, You will need a BroadcastReceiver and have to override

@Override
protected void onIncomingCallReceived(Context ctx, String number, Date start)
{
    //
}

Also insert permissions in Manifest.xml . If you want compatibility over oreo use runtime permissions for those permissions