PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → Unable to send SMS from mobile app on Android 8.0
Unable to send SMS from mobile app on Android 8.0
Débuté par Gautam, 23 oct. 2018 11:22 - 10 réponses
Membre enregistré
67 messages
Posté le 23 octobre 2018 - 11:22
Hi all,

I have an android app that reads, deletes and sends sms.

This was working fine until I moved the app to a device with Android 8.0.

Previous phone was on Android 6.0.1 and app works fine on it.

Nothing was changed programmatically in the app but now I get the following error:

"System Error Message - Neither user 10099 nor current process has android permission READ_PHONE_STATE"

During the generation, permission READ_PHONE_STATE is included as a required permission.

Has anyone had this issue - any idea how to resolve this permission issue?
Membre enregistré
81 messages
Popularité : +7 (7 votes)
Posté le 11 novembre 2018 - 03:16
Hi,

I have the same problem, suddenly my app stopped working,

When I try to send SMS I got a similar error : Neither user xxxxx nor current process has android.permission.READ_PHONE_STATE,

I already added READ_PHONE_STATE permission but the problem persists,

Gautam, did you find any solution ?

Thank you.
Membre enregistré
67 messages
Posté le 12 novembre 2018 - 06:52
Hi Mouhi

No, unfortunately no solution yet. I believe its a known bug in Android 8.0. Apparently, its fixed in 8.1 but I have not tried it using 8.1.
See the article below:
https://stackoverflow.com/questions/46421412/android-8-requires-read-phone-state-when-calling-smsmanager-sendtextmessage
Please let me know if you manage to get it working with 8.1.

Thanks and regards
Gautam
Posté le 13 novembre 2018 - 18:40
I am having the same issue.
My phone upgraded to Android version 8.1.0 yesterday.
SMS no longer works in an app that it was previously.
Posté le 14 novembre 2018 - 16:03
A little more info.
I had the same app built in App Inventor 2.
I had the same issue. In App Inventor 2 all that was necessary to fix it was to add a Phone block to the project.
Whatever is in that phone block was enough to add the necessary permissions.
It should be repairable in WinDev should it not?

Jim
Posté le 15 novembre 2018 - 16:01
I have it working.
I added android.permission.READ_PHONE_STATE at generation.
Then I needed to manually enable Phone in App permissions on the phone itself for my app.

Jim
Membre enregistré
67 messages
Posté le 15 novembre 2018 - 17:39
Oh well done Jim! Great to hear you got it working!. Will try it on my app and see if it will do the trick. Which version of Android is the phone on?

Gautam
Posté le 16 novembre 2018 - 16:12
Guatam,

My phone (Moto G5 Plus) with the issue is on Android 8.1.0.
Curiously my boss's phone did not exhibit the issue at all. His is a Samsung running 8.0.0.

Jim
Membre enregistré
81 messages
Popularité : +7 (7 votes)
Posté le 16 novembre 2018 - 18:33
Hello,

I have the same version 8.0.0 as you Gautam,

I think I'll use internet mode insead of SMS :(

Jim, are you sure your boss's phone is running on Android 8.0.0 ?

Thank you,
Posté le 19 novembre 2018 - 17:26
Yes my boss's phone is running 8.0.0.

Another problem. I just got an email from the Play Store. An excerpt is below.


"Hello Google Play Developer,

In October, we announced updates to our Permissions policy that will limit which apps are allowed to request Call Log and SMS permissions. This policy will impact one or more of your apps.

Only an app that has been selected as a user's default app for making calls or text messages, or whose core functionality is approved for one of the exception use cases, will be able to request access to Call Log or SMS permissions."

I applied for an exception, but I doubt it will be granted.
One of the requirements is you cannot ask the end user to go into settings!
Membre enregistré
81 messages
Popularité : +7 (7 votes)
Posté le 23 novembre 2018 - 23:08
Okay,

So I'll change my app, I'll use internet instead of SMS,

Thank you Jim :)