最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

kotlin - SMS Permissions Remain Disabled on Some Devices – Android SDK 35 - Stack Overflow

programmeradmin2浏览0评论

I have an Android application that communicates with a specific device via SMS. The app requires the following permissions to send and receive SMS messages:

<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
<uses-permission android:name="android.permission.READ_SMS"/>

These permissions are requested at runtime using the standard requestPermissions() API.

On devices running Android 14 (SDK 34) and Android 15 (SDK 35), the app works fine on the emulator. However, some users with certain brands (e.g., Xiaomi, Oppo, Vivo) report that:

Even after granting the SMS permissions within the app, the permissions remain disabled. They cannot manually enable these permissions from system settings. The issue persists even after reinstalling the app or rebooting the phone.

Context:

  • The app targets SDK 35.

  • No issues occur on the emulator.

  • Permissions are requested at runtime when the user adds a device.

  • Ensured that POST_NOTIFICATIONS permission is granted for Android 13+ to receive SMS notifications.

  • Manually enabled SMS permissions from system settings (failed).

  • Tested on Pixel emulator (Android 14/15), where it works without issues.

What could be causing SMS permissions to remain disabled on certain brands (e.g., Xiaomi)? Are there any device-specific restrictions introduced in SDK 34+ that affect SMS access? Is there a workaround to ensure users can successfully grant SMS permissions on affected devices?

Any insights or solutions would be greatly appreciated

发布评论

评论列表(0)

  1. 暂无评论