-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sms.requestPermission always calls error handler #189
Comments
Hey Jeff, Thanks for reaching out.
The permission is only required if you sent the SMS with Have you checked logcat? |
Awesome, thanks for replying, Didier. I haven't checked logcat. I honestly don't know much about how Android works and am still trying to figure it all out. After I posted my question I rewrote our code to just directly call sms.send(), and that did work. It brought up the native Android message app with the number and message pre-filled. Our next struggle is getting the new app approved by the Google Play store. It keeps removing our app saying we don't comply with their SMS policy, and yet there is no SMS privilege specified in the app manifest. Our app store listing even shows "Send SMS messages" under the permissions section, even though it shouldn't be there. Strange. Anyway, thanks for your help! |
Hey Jeff, Glad you figured it out. Make sure the permission are not in the I'd recommend you to do a search across all your files to look for the permission name Let me know when you figure it out. |
Hey Didier, Thanks for the advice! I cleaned the project and then did a build, and verified that READ_PHONE_STATE and SEND_SMS don't appear anywhere in the project. Well, SEND_SMS appears a few times, but only in the actual plugin code and build artifacts. I uploaded the new APK to Google Play, and it keeps bringing up the "Permissions Declaration Form", as if there is a SEND_SMS permission still declared. The options are "Yes", for which you have to declare why sending SMS messages is a core functionality of your app -- which doesn't apply to us, or "No", which says that our app doesn't meet their SMS permissions policy. I would expect that that form wouldn't even appear if the APK doesn't declare SEND_SMS, though. Do you have any thoughts on this? |
Yop,
Which build artifacts are you referring to?
Not really, sorry. Post the same message on this issue: #183. Maybe someone else had the same issue. |
Those are the only hits for SEND_SMS. I'm not too familiar with Cordova, but I think they are benign. Thanks! |
Yep they are benign, just wanted to double check. Please cross post your problem on the other thread and hopefully, someone will be able to help you out. |
hey @JeffBerman, any updates? |
Hey @dbaq, thanks for following up. Sorry for not getting back to you sooner, I was out of town. Yes, it looks like after loading every app release slot with the latest APK, it took over a day for the Google warning message to go away. It has been several days now and the warning message has not reappeared, so I think we're good. Thanks again for your help! |
No worries, I am glad you figured out your problem. Happy coding! |
I got the exact same problem. But want to use 'intent': '' thus not open the SMS app thus need the permission. The adb logcat didn't reveal anything which was close to permissions.. The failure object is' USER HAS DENIED PERRMISSION', but in settinsg -> SMS I cannot find my cordova app to allow it? When adding the SEND_SMS to platforms/android/android.json
I get " platforms/android/app/src/main/res/xml/config.xml:10: error: unbound prefix." So I think some documentation is missing ? |
Hi, our Cordova app has always used the cordova-sms-plugin and it has worked great (thank you). Due to the Google policy change we have updated our app to have the latest version of the plugin, but we can't get it to work on Android devices.
We do specify
intent: 'INTENT'
in the options object, and we copied in the sample code with the checkSMSPermission() and requestSMSPermission() functions. However, requestSMSPermission() always logs '[WARN] Permission not accepted' and the SMS is not sent.When using the native Android messaging app to send SMS on behalf of our Cordova app, are checkSMSPermission() and requestSMSPermission() required? Or are they only needed when trying to send SMS directly from within the Cordova app?
Thanks!
The text was updated successfully, but these errors were encountered: