简体   繁体   中英

Codename One sendSMS on Android

With the recent Android policy updates, sendSMS no longer works properly. In our app, we have buttons to allow users to call or send messages to their contacts. The buttons call Display.getInstance().dial(phoneNumber); and Display.getInstance().sendSMS(phoneNumber, message, true); respectively.

Currently, both options redirect to my default phone or sms app with the phone number (and message) in place. This would mean our app doesn't actually need the SEND_SMS permission since it's not doing the actual sending. However, if I remove the permission when building the apk in Android Studio, the SMS button no longer functions.

Is there any workaround for this? At the moment we're not able to deploy our app on the Play Store with this permission.

We will remove the SMS permission from the coming update.

We'll fix the Android port so sendSMS with the true argument should work correctly. Unfortunately we don't have an immediate workaround other than using native interfaces. This fix should be available this Friday (March 8th 2019).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM