You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code works but it doesn't send the SMS automatically.
Code:
var smsMessenger = CrossMessaging.Current.SmsMessenger;
if (smsMessenger.CanSendSms)
{
try
{
smsMessenger.SendSms("+351xxxxxxxxx", "Well hello there from Xam.Messaging.Plugin");
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
When i try to run this code, i get this Exception:
The error clearly indicates that the tag android.permission.SEND_SMS isn't present, but it is .. and smsMessenger.SendSms works fine..
Sorry if this is a newbie question, but i would be much appreciated if you could help me :)
The text was updated successfully, but these errors were encountered:
Hello, solved it. Found what i need in this answer: Android permission doesn't work even if I have declared it
So basically we need to add the permission in both sides, program side and also have to ask for those permissions at runtime from the user.
I just enabled SMS permissions on my phone and it worked!
Bug Information
Version Number of Plugin: 5.2.0
Android Version: 11
Version of VS: 16.11.5
Version of Xamarin: 16.11
Hello, i'm very new to Xamarin development and I'm trying to send a background SMS.
my AndroidManifest.xml:
This code works but it doesn't send the SMS automatically.
Code:
When i try to run this code, i get this Exception:
The error clearly indicates that the tag
android.permission.SEND_SMS
isn't present, but it is .. andsmsMessenger.SendSms
works fine..Sorry if this is a newbie question, but i would be much appreciated if you could help me :)
The text was updated successfully, but these errors were encountered: