Reputation: 1465
Overview, July 24, 2023
Nokia C01 Plus, Android 11 Go
The original problem raised here was the exception "Sms is not supported" when sending a message, from an app which has the correct settings and has been working for several weeks.
We have diagnosed this as a complete failure of the SMS system on the phone as if it were an Android device without SMS.
The problem is known to be fixed with a cold reboot of the phone, ie Power Off/ Wait / Power On, rather than "Restart".
A second device has registered the same problem.
Doing a cold restart from software is available on some phones, but not this one.
Original Summary
2023-06-24 04:22:41 [STACK_TRACE]=java.lang.UnsupportedOperationException: Sms is not supported
Raised in code which:
The platform history
I have a product which packages an Android app with a consumer phone, and which sends SMS messages from the app to clients (It also receives them). It's been in production for ten years, and the particular lines of code which caused this problem are more than five years old.
In March 2023 we started deploying the app on the Nokia C01 plus phone, with Android 11 Go. Twenty have been deployed, and this problem arose on one of the more recent deployments in June.
We had considerable problems adapting the app to Android 11 Go. New "Permissions" handling were a problem, but handled. An unsolved problem was that the Nokia C01 Plus tries to push OS updates, and this can't be disabled. We attempted to handle this by disabling wi-fi.
The particular phone with this issue was deployed in May 2023. There are identical models both older and more recent which are continuing to function correctly.
The Problem
This particular phone was working as intended (ie. sending SMS over several weeks) when this exception was raised.
2023-06-24 04:22:41
[STACK_TRACE]=java.lang.UnsupportedOperationException: Sms is not supported
at android.telephony.SmsManager.getISmsServiceOrThrow(SmsManager.java:1658)
at android.telephony.SmsManager.getSubscriptionId(SmsManager.java:1520)
at android.telephony.SmsManager.resolveSubscriptionForOperation(SmsManager.java:1545)
at android.telephony.SmsManager.sendTextMessageInternal(SmsManager.java:601)
at android.telephony.SmsManager.sendTextMessage(SmsManager.java:443)
at au.com.cba.nopowersms.services.SendSmsBase.sendSmsToNumber(SendSmsBase.java:192)
at
From this line in our code...
After the exception occurred once, it continued to occur each time the app tried to sent an SMS - until the phone was restarted.
The problem IS NOT:
Missing permissions. The app has SMS and PHONE permissions, and these also raise a different exception (SecurityException: Sending SMS message: uid 10157 does not have android.permission.SEND_SMS).
A “normal” network unavailability problem. I’ve forced network failure by deactivating the SIM with our network provider, and this is handled by the sentIntent
See the handling of results from SmsManager.sendTextMessage in our log below...
The problem was “fixed” by restarting the phone. No other changes were made (eg. permissions or network access). With a restart, it simply started sending messages correctly again.
However, our network logs show that their may have been network outages at the time of the failure.
Question 1. Could a network outage cause this exception, where deactivating the SIM on the network is properly handled?
My best guess is that rather than being caused by any network issue the phone operating system or hardware has simply failed, and randomly decided that “SMS is not supported”, as if missing the required hardware. This was fixed by restarting the phone. It may be related to the unwanted pushing of updates. However, the same would apply to other phones released
Question 2. Is this likely, ie. for the phone to erroneously report “SMS is not supported”, to be fixed with a restart?
Question 3. Any other explanations or suggestions?
Further info
After initial post...
I tested the effect of removing the SIM, trying to reproduce "SMS is not supported". This was handled by the BroadcastReceiver in sentIntent with the result code SmsManager.RESULT_ERROR_NO_SERVICE
, and logged.
Some googling has produced 'hits' on Dual Sim phones. The Nokia C01 plus is a dual SIM phone!. This may be the problem. I've confirmed that the SIM is correctly inserted in Slot 1, but possibly Nokia/Android have got confused. Maybe the (valid) loss of network service prompted it to switch to SIM 2, which is not there?
A second Nokia C01 Plus has failed in the field. From the report by the client the fault is the same. It worked for a month, then stopped sending SMS while otherwise continuing to work. After the first SMS failure it continued to fail. The client hasn't restarted the phone.
There was total loss of SMS communications between the first failure (June) and the restart (July). No incoming SMS were received by the App either, and, looking at the Messenger app, by the Android system itself, while the network logs shows them being sent. Definitely an Android and/or hardware problem, probably related to Dual Sim
Upvotes: 2
Views: 284