Reputation: 3
I'm building an application consisting of an automatic SMS sender in Xamarin .
//This is part of larger class
public void Send()
{
SmsManager.Default.SendTextMessage(DestinationNumber, null, Message,SentPendingIntent, null);
}
If I use a Huawei P10Pro ( Api level 28 , v9.0)the SMSs are delivered despite that the default messaging app do not show them. But if I switch to another phone , a Samsung A21(API Level 30 ,v11.0) no SMS's are delivered but they appear in the default messaging app. The ResultCode of the PendingIntent will be -1(Result_Ok) for both phones.
Also if I take the Sim card out of any phone the ResultCode will be RESULT_ERROR_NO_SERVICE so the PendingIntent works properly i guess.
I see SMSManager.Default is deprecated . Could this cause the issue?
PS:I did not add more code because I feel my issue lies outside of the code itself and I was not willing to create a too long post
Upvotes: 0
Views: 124