npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

expo-android-sms-sender

v1.0.2

Published

Expo module for sending SMS messages on Android using native code. Built for React Native projects.

Readme

📩 Expo Android SMS Sender

Expo Android SMS Sender is a lightweight, easy-to-use library for sending SMS messages and retrieving SIM card information in React Native applications using the Expo Modules API. This package is designed specifically for Android devices.

❗ This library only works on Android. Sending SMS programmatically is not possible on iOS due to Apple's security restrictions. If you need to open the messaging app on iOS instead, consider using expo-sms.


🚀 Features

  • Send SMS messages directly from your React Native app.
  • Retrieve available SIM cards on dual-SIM devices.
  • Select a specific SIM card for sending messages.
  • Built with Expo Modules API for better native integration.

📦 Installation

This package requires a bare Expo project with a development build because it uses native code. Follow these steps to install:

1️⃣ Install the package:

npm install expo-android-sms-sender

2️⃣ Rebuild your project

Since this package includes native code, you must rebuild your app using a development build:

eas build --profile development --platform android

or if using Expo Dev Client:

npx expo run:android

🔒 Permissions

  • The SEND_SMS permission is required for the sendSms() function.
  • The READ_PHONE_STATE permission is required for the getSimCards() function.

Make sure to request these permissions at runtime before using the respective functions.


📖 API Reference

getSimCards(): Promise<SimCard[]>

Retrieves information about available SIM cards on the device.

Returns:

An array of objects with the following properties:

type SimCard = {
  id: number;          // Unique SIM card identifier (subscription ID)
  displayName: string; // SIM name as displayed in system settings
  carrierName: string; // Mobile network carrier name
  slotIndex?: number;  // Slot index (if available)
};

Example usage:

import { getSimCards } from "expo-android-sms-sender";
import { PermissionsAndroid } from 'react-native';

async function fetchSimCards() {
  try {
    const granted = await PermissionsAndroid.request(
      PermissionsAndroid.PERMISSIONS.READ_PHONE_STATE
    );
    if (granted === PermissionsAndroid.RESULTS.GRANTED) {
      const sims = await getSimCards();
      console.log("Available SIM Cards:", sims);
    } else {
      console.log("READ_PHONE_STATE permission denied");
    }
  } catch (error) {
    console.error("Error fetching SIM cards:", error);
  }
}

sendSms(phoneNumber: string, text: string, simCardId?: number): Promise<void>

Parameters:

  • phoneNumber (string) → The recipient's phone number.
  • text (string) → The message body.
  • simCardId (number, optional) → The ID of the SIM card to use. If omitted, the system will use the default SIM.

Example usage:

import { sendSms } from "expo-android-sms-sender";
import { PermissionsAndroid } from 'react-native';

async function sendMessage() {
  try {
    const granted = await PermissionsAndroid.request(
      PermissionsAndroid.PERMISSIONS.SEND_SMS
    );
    if (granted === PermissionsAndroid.RESULTS.GRANTED) {
      await sendSms("PHONE_NUMBER_TO_SEND_TO", "Hello from Expo!");
      console.log("Message sent successfully!");
    } else {
      console.log("SEND_SMS permission denied");
    }
  } catch (error) {
    console.error("Error sending SMS:", error);
  }
}

📢 Reporting Issues & Feature Requests

If you encounter a bug, have a question, or want to request a feature, please open an issue on GitHub.

When submitting an issue, please include:

  • A clear description of the problem.
  • Steps to reproduce it.
  • Any relevant logs or error messages.
  • The version of the library and your Expo SDK version.

We appreciate your feedback and contributions!


🤝 Contributing

We welcome contributions from the community! If you'd like to contribute:

  1. Fork the repository on GitHub.
  2. Create a new branch (feature/my-feature or fix/bug-name).
  3. Commit your changes with clear messages.
  4. Submit a pull request and wait for review.

Make sure to follow the project's coding guidelines.

📝 License

MIT license. Feel free to use and modify.