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  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.
- 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 . 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.
- 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.