简体   繁体   English

代号一在 Android 上发送短信

[英]Codename One sendSMS on Android

With the recent Android policy updates, sendSMS no longer works properly.随着最近的 Android 政策更新,sendSMS 不再正常工作。 In our app, we have buttons to allow users to call or send messages to their contacts.在我们的应用程序中,我们有按钮允许用户给他们的联系人打电话或发送消息。 The buttons call Display.getInstance().dial(phoneNumber);按钮调用Display.getInstance().dial(phoneNumber); and Display.getInstance().sendSMS(phoneNumber, message, true);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.这意味着我们的应用实际上并不需要 SEND_SMS 权限,因为它没有进行实际的发送。 However, if I remove the permission when building the apk in Android Studio, the SMS button no longer functions.但是,如果我在 Android Studio 中构建 apk 时删除了权限,则 SMS 按钮将不再起作用。

Is there any workaround for this?有什么解决方法吗? At the moment we're not able to deploy our app on the Play Store with this permission.目前,我们无法使用此权限在 Play 商店中部署我们的应用程序。

We will remove the SMS permission from the coming update.我们将从即将到来的更新中删除 SMS 权限。

We'll fix the Android port so sendSMS with the true argument should work correctly.我们将修复 Android 端口,以便使用 true 参数的sendSMS应该可以正常工作。 Unfortunately we don't have an immediate workaround other than using native interfaces.不幸的是,除了使用本机接口之外,我们没有立即的解决方法。 This fix should be available this Friday (March 8th 2019).此修复程序应在本周五(2019 年 3 月 8 日)可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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