Posts

Showing posts from June, 2015

Code to Launch the Phone Dialer in Xamarin.Forms

Image
When we code to start a voice call, we must be aware of  Dependency Service  in Xamarin.Forms. DependencyService in Xamarin.Forms provides access to the native functionality and some platform-specific implementations of the iOS, Android and Windows Phone SDKs from your PCL or Shared Project. To start a voice call there are some platform-specific implementations and permissions. 1.  The following is the procedure to implement the voice call in Xamarin.Forms. Let's create a ContentPage with an entry and a button as  HomePage.cs. 2.  Create an interface  IPhoneCall.cs  in the shared code that shows the functionality that we intend to implement. 3.  The Interface must be implemented in each platform-specific application project. Android implementation:  Before implementing the interface in Android don't forget to set some permissions in  AndroidManifest.xml . These permissions are necessary for invoking a voice call in Android. After setting the permissions we