Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMS sender not working #1

Open
puneetkansal04 opened this issue Jun 16, 2023 · 1 comment
Open

SMS sender not working #1

puneetkansal04 opened this issue Jun 16, 2023 · 1 comment

Comments

@puneetkansal04
Copy link

It is not working nor giving me any error

@Animesh-Ghosh
Copy link

Animesh-Ghosh commented Sep 14, 2023

Yup, here are the steps and code I used to use the library:

  1. install the package
yarn add react-native-sms-sender
  1. add a Button or TouchableOpacity to trigger the library's method
import { View, Button } from 'react-native'

function App() {
  async function handleSendSMS() {
    console.log('handleSendSMS called...')
    await SendSMS.send({
      body: 'The default body of the SMS!',
      recipients: ['+919988776655'],  // sample phone
    })
  }

  return (
    <View>
      <Button title="Send SMS" onPress={handleSendSMS} />
    </View>
  )
}

export default App

When I press the button, the message "handleSendSMS called..." gets logged to the console, but no SMS is sent. I used the React Native CLI to bootstrap the project.
No Permissions pop-up showed up as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants