tkporter/react-native-sms

Crash: Permission required even with 'allowAndroidSendWithoutReadPermission={true}'

ObidosDev opened this issue ยท 7 comments

I have got crash on Mi MAX 2. The solution for it is do not call registerContentObserver:
private static final Uri uri = Uri.parse("content://sms/"); resolver.registerContentObserver(uri, true, this);
@robinaugh this is for you may be interesting

Thanks for the heads up @ObidosDev...we've seen a crash on another Xiaomi device as well (Mi 5). Do you want to put together a pull request with the fix you described above? If not, I may be able to get to it this week.

I've put up #60 to address this.

@ObidosDev @robinaugh

Sorry for bringing up this issue again, but can anyone confirm if this crash is occurring on the newest version of the lib?

I'm currently working on refactoring our app to send SMS without needing the READ_SMS permission.

I've seen that the PR that @robinaugh made never got merged, and I don't have any xioami device to test this scenario.

Thanks for the issue report by the way ๐Ÿ‘

@iujisato I would assume that this is still an issue in the latest release, but I also was never able to test (either the released library or my branch) on a physical xioami device.

I believe the Play Store is now preventing non-messaging apps from accessing the READ_SMS permission, so any such app using this library should probably be updated to use the allowAndroidSendWithoutReadPermission flag and would need the patch from #60 in order to work with xioami devices.

@robinaugh thanks for the answer!

@tkporter any hope of #60 being merged in any future release? I don't like to use custom forks for production apps, so if #60 never got merged it would be better to think on another solution for my app.

I tested with my Xiaomi and issue persist, I used the version "react-native-sms": "1.8.0"

is there any plan to solve?

Published under 1.10.0, closing for now