Open lpereira98 opened 3 years ago
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!
Thanks!
hi you can get permission with this
if(await Permissions.CheckStatusAsync<Permissions.Sms>() != PermissionStatus.Granted)
{
var status = await Permissions.RequestAsync<Permissions.Sms>();
}
and documentation about https://docs.microsoft.com/en-us/xamarin/essentials/permissions?tabs=android
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 :)