Android Send SMS Permission working on other 23+ devices but not with the OnePlus 5

风格不统一 提交于 2019-12-08 09:54:19

问题


I have an application that requests permission to send SMS from the user then sends a formatted SMS in the background. This works on all other 23+ devices except my new OnePlus 5.

Does anyone know what might be going on?


回答1:


May be it is happening because of the third party app permission. One plus uses Oxygen Os and Settings are managed from a custom settings view in Oxygen OS.

You should open the application Settings page instead

Intent intent = new Intent();
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
Uri uri = Uri.fromParts("package", getPackageName(), null);
intent.setData(uri);
startActivity(intent);


来源:https://stackoverflow.com/questions/46224844/android-send-sms-permission-working-on-other-23-devices-but-not-with-the-oneplu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!