Hi!
I would like to know how to call a number from app. I tried to look for it over the net but I can't find one for c#.
thanks
This works fine for me…
using System; using MonoTouch.Foundation; using MonoTouch.UIKit; namespace pfjtest { public static class EmergencyCall { public static void callNumber() { string phoneNumber = "939-555-0113"; string phoneURLString = string.Format("tel:{0}", phoneNumber); NSUrl phoneURL = new NSUrl(phoneURLString); UIApplication.SharedApplication.OpenUrl(phoneURL); } } }
OK, this is overly long as it's from much larger app, but simply done
var url = NSUrl.FromString("tel:939-555-0113"); UIApplication.SharedApplication.OpenUrl(url);
will do the job
Paul
telprompt: is another nice one that provides the Call/Cancel dialog functionality to you for free, too.
thank you for your response!
Posts
This works fine for me…
OK, this is overly long as it's from much larger app, but simply done
will do the job
Paul
telprompt: is another nice one that provides the Call/Cancel dialog functionality to you for free, too.
thank you for your response!