Programmable Voice

  1. Home
  2. Docs
  3. Programmable Voice
  4. Mobile
  5. ME Inbound Calls in Android

ME Inbound Calls in Android

Steps for Inbound Calls

  • Android devices use Google Cloud Messaging service to deliver remote push notifications. When an inbound call reaches our Voice Elements server application, then the server sends a push notification through GCM services. The server uses the PushSharp library to send the push notifications. GCM sends these messages to the intended device. Visit this [1] for more understanding on remote push notifications and its configuration.
  • When the notification arrives at the end device, the Mobile Elements pops a screen to answer/reject the call. Missed call alerts can also be delivered to the end device if the Internet service is not available on the device.
  • Right click on the MobileElements.Droid and click on the Properties. Then select the Build tab and set the Conditional compilation symbols to ENABLE_REGISTRATION. This flag will enable inbound call feature in the application.

AndroidInbound-1.PNG

  • Verify that your device should contain Google Play Services in order to receive GCM push messages. Install the package Xamarin Google Play Services – GCM into your Mobile Elements client project.
  • Create a project in Google Developer Console [2]. You need to give a App name and Android Package Name over there. Note down your package name, API key, Sender ID and Application ID which will be needed later in the configuration.
  • Now right click on the MobileElements.Droid and click on the Properties. Then select the Android Manifest tab and set your package name over there.

AndroidOutbound-3.PNG

  • Open the UserCredentials.cs file and set the URI and host of your server in order to connect through the web socket for outbound calls. Then open the MainActivity.cs file of MobileElements.Droid project and set the sender id in the beginning.
  • Now you are all set to place an inbound call to your device through GCM push notifications.
Was this article helpful to you? Yes 8 No

How can we help?