How to use the expo-sms.isAvailableAsync function in expo-sms

To help you get started, we’ve selected a few expo-sms examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github keybase / client / shared / util / sms.native.tsx View on Github external
const openSMS = (phonenos: Array, body?: string): Promise => {
  return SMS.isAvailableAsync().then(isAvailable => {
    if (!isAvailable) {
      throw new Error('SMS not available')
    }
    return SMS.sendSMSAsync(phonenos, body || '')
  })
}

expo-sms

Provides access to the system's UI/app for sending SMS messages.

MIT
Latest version published 3 months ago

Package Health Score

89 / 100
Full package analysis