NachoImperium
New Member
Hey,
my app should inform the user as soon as you receive an SMS.
The permissions etc. I have already assigned everything, in my emulator everything works perfectly but unfortunately not with my real phone (Xiaomi). The Android version is the same, what is the reason?
my app should inform the user as soon as you receive an SMS.
The permissions etc. I have already assigned everything, in my emulator everything works perfectly but unfortunately not with my real phone (Xiaomi). The Android version is the same, what is the reason?
Code:
[BroadcastReceiver(Enabled = true, Exported = true, Permission = "android.permission.RECEIVE_SMS")]
[IntentFilter(new[] { "android.provider.Telephony.SMS_RECEIVED" }, Priority = (int)IntentFilterPriority.HighPriority)]
public class SmsListener : BroadcastReceiver
{
protected string message, address = string.Empty;
public async override void OnReceive(Context context, Intent intent)
{
if (intent.Action.Equals("android.provider.Telephony.SMS_RECEIVED"))
{
//Do code