Dev waddah Dev waddah - 3 months ago 10
C# Question

ActionDial does not display # in call screen

I have a problem in this code, why does it not display # in call screen?

intent.button.Click += delegate {
var uri = Android.Net.Uri.Parse ("tel:*177*1112223333#");
var intent = new Intent (Intent.ActionDial, uri);
StartActivity (intent);
};

Answer

You have to encode (escape) the Uri to send a "#" to the dialer:

var uri = Android.Net.Uri.Parse("tel:" + Android.Net.Uri.Encode("*177*1112223333#"));
var intent = new Intent(Intent.ActionDial, uri);
StartActivity(intent);

enter image description here

Ref: RFC 3966