react-native-sms icon indicating copy to clipboard operation
react-native-sms copied to clipboard

Is there a particular reason why sending message in background is not supported?

Open picodoth opened this issue 5 years ago • 2 comments

In the readme, there is a section describing

Currently, only user-initiated sending of an SMS is supported. This means you can't use react-native-sms to send an SMS in the background-- this package displays the native SMS view (populated with any recipients/body you want), and gives a callback describing the status of the SMS (completed/cancelled/error). PRs are welcome!

Is there a particular reason for not doing it? I'm very new to this and thanks your time for answering!

picodoth avatar Sep 25 '19 04:09 picodoth

Hey! There’s a PR that does this for Android that’s been open for ages (#44) that I’ve been meaning to merge with some cleanup (particularly make sure that the permissions needed for that aren’t required)

As for iOS, Apple doesn’t allow background sms for security reasons :)

tkporter avatar Sep 27 '19 16:09 tkporter

Please check the google app store. If your app is not a Communication type Application, you are not allowed to use the SMS permission.

I would advice to use the same method as iOS where it redirects to a SMS type Application

chuyeoh avatar Nov 11 '19 00:11 chuyeoh