Forum Xamarin.iOS

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

how to call phone number by xamarin.ios?

weikychenweikychen USMember ✭✭

i have a listview, and when user click the number item, i want to show the calling number UI of IOS. how to ?
thanks!

Tagged:

Answers

  • Rshirsagar99Rshirsagar99 INMember ✭✭

    Hello weikchen, I hope the following code will help you. So check out code :


    using Foundation;
    using System;
    using System.CodeDom.Compiler;
    using UIKit;

    namespace appname
    {
    partial class HomeView : UIViewController
    {

        public HomeView (IntPtr handle) : base (handle)
        {
            phonebutton.TouchUpInside += delegate {
                var url = new NSUrl("tel:12345678");
                UIApplication.SharedApplication.OpenUrl(url);
            };
        } 
    }
    

    }


    I am new to Xamarin iOS so any links of examples would be so amazing!

    Regards
    Rajesh

  • Rshirsagar99Rshirsagar99 INMember ✭✭

    Hello weikychen ,
    Check out the following code, I hope this will help you.


    using Foundation;
    using System;
    using System.CodeDom.Compiler;
    using UIKit;

    namespace appname
    {
    partial class HomeView : UIViewController
    {

        public HomeView (IntPtr handle) : base (handle)
        {
            phonebutton.TouchUpInside += delegate {
                var url = new NSUrl("tel:12345678");
                UIApplication.SharedApplication.OpenUrl(url);
            };
        } 
    }
    

    }


    I am new to Xamarin iOS so any links of examples would be so amazing!

Sign In or Register to comment.