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

@capawesome/capacitor-sms-composer

v0.1.2

Published

Capacitor plugin to open the native SMS composer on Android and iOS.

Readme

Capacitor SMS Composer Plugin

Capacitor plugin to open the native SMS composer prefilled with recipients and a message body.

Features

  • ✉️ Compose: Open the native SMS composer prefilled with recipients and a message body.
  • ✅ Capability check: Check whether the device is able to compose and send SMS messages.
  • 🔒 Privacy-friendly: The user always reviews and sends the message. The plugin never sends SMS on its own.
  • 🤝 Compatibility: Works alongside the Android SMS Retriever, Contacts and Mail Composer plugins.
  • 📦 CocoaPods & SPM: Supports CocoaPods and Swift Package Manager for iOS.
  • 🔁 Up-to-date: Always supports the latest Capacitor version.

Missing a feature? Just open an issue and we'll take a look!

Use Cases

The SMS Composer plugin is typically used whenever an app wants to hand off a prefilled text message to the user, for example:

  • Invite friends: Prefill an invitation message with a download link that users can send to their contacts.
  • Share content: Let users share an article, a product, or a coupon code via text message.
  • Contact support: Open the composer prefilled with your support phone number and a message template.
  • Feature detection: Hide SMS-related features on devices without SMS capability, such as Wi-Fi-only tablets, using canComposeSms.

Compatibility

| Plugin Version | Capacitor Version | Status | | -------------- | ----------------- | -------------- | | 0.x.x | >=8.x.x | Active support |

Installation

You can use our AI-Assisted Setup to install the plugin. Add the Capawesome Skills to your AI tool using the following command:

npx skills add capawesome-team/skills --skill capacitor-plugins

Then use the following prompt:

 Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capawesome/capacitor-sms-composer` plugin in my project.

If you prefer Manual Setup, install the plugin by running the following commands and follow the platform-specific instructions below:

npm install @capawesome/capacitor-sms-composer
npx cap sync

This plugin is only available on Android and iOS. On Web, all methods reject as unimplemented.

Android

No additional configuration is required. The plugin declares the necessary <queries> element for the smsto scheme in its AndroidManifest.xml, so the SMS capability can be detected on Android 11 (API level 30) and higher.

Configuration

No configuration required for this plugin.

Usage

The following examples show how to check whether the device can send SMS messages and open the native SMS composer.

Check whether the device can send SMS messages

Check whether the device is able to compose and send SMS messages, for example to hide SMS-related features on devices without SMS capability such as Wi-Fi-only tablets or iPads. Only available on Android and iOS:

import { SmsComposer } from '@capawesome/capacitor-sms-composer';

const canComposeSms = async () => {
  const { canCompose } = await SmsComposer.canComposeSms();
  return canCompose;
};

Open the SMS composer

Open the native SMS composer prefilled with recipients and a message body. The user reviews the message and decides whether to send it; the plugin never sends the message itself. The call resolves with a status once the composer is dismissed (see Result Status). Only available on Android and iOS:

import { SmsComposer } from '@capawesome/capacitor-sms-composer';

const composeSms = async () => {
  const { status } = await SmsComposer.composeSms({
    recipients: ['+41791234567'],
    body: 'Hello from Capacitor!',
  });
  return status;
};

API

canComposeSms()

canComposeSms() => Promise<CanComposeSmsResult>

Check whether the device is able to compose and send SMS messages.

On devices without SMS capability (e.g. Wi-Fi-only tablets or iPads), this resolves with canCompose set to false.

Only available on Android and iOS.

Returns: Promise<CanComposeSmsResult>

Since: 0.1.0


composeSms(...)

composeSms(options: ComposeSmsOptions) => Promise<ComposeSmsResult>

Open the native SMS composer prefilled with the given recipients and body.

The user reviews the message and decides whether to send it. The plugin never sends the message itself.

The call resolves once the composer is dismissed. If the device is not able to compose SMS messages, the call rejects as unavailable.

Only available on Android and iOS.

| Param | Type | | ------------- | --------------------------------------------------------------- | | options | ComposeSmsOptions |

Returns: Promise<ComposeSmsResult>

Since: 0.1.0


Interfaces

CanComposeSmsResult

| Prop | Type | Description | Since | | ---------------- | -------------------- | ------------------------------------------------------------ | ----- | | canCompose | boolean | Whether the device is able to compose and send SMS messages. | 0.1.0 |

ComposeSmsResult

| Prop | Type | Description | Since | | ------------ | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----- | | status | SmsComposeStatus | The status of the SMS composer after it was dismissed. On Android, the status is always unknown because the system does not report whether the message was sent. | 0.1.0 |

ComposeSmsOptions

| Prop | Type | Description | Since | | ---------------- | --------------------- | ---------------------------------------------------------- | ----- | | body | string | The message body to prefill in the composer. | 0.1.0 | | recipients | string[] | The recipients (phone numbers) to prefill in the composer. | 0.1.0 |

Type Aliases

SmsComposeStatus

The status of the SMS composer after it was dismissed.

  • sent: The user sent the message.
  • canceled: The user canceled the composer without sending the message.
  • unknown: The result is unknown. This is always the case on Android.

'canceled' | 'sent' | 'unknown'

Result Status

The composeSms(...) method resolves with a status once the composer is dismissed:

  • On iOS, the status reflects the actual outcome (sent, canceled).
  • On Android, the status is always unknown because the system does not report whether the message was sent.

Multiple Recipients

Multiple recipients are joined with a semicolon (;) in the underlying smsto: URI on Android. Some messaging apps expect a comma (,) instead, so multi-recipient prefilling may not work reliably across all Android messaging apps.

FAQ

How is this plugin different from other similar plugins?

It opens the native SMS composer prefilled with recipients and a message body through a fully typed API, with a canComposeSms() check so you can hide the feature on devices without SMS capability such as Wi-Fi-only tablets. The user always reviews and sends the message, so no SMS permissions are needed, and on iOS you get the real send status back. If you only need a basic smsto: link, that's simple enough; if you want capability detection and a consistent composer across Android and iOS, this plugin is designed for exactly that.

Does the plugin send SMS messages automatically?

No, the plugin never sends SMS messages on its own. It opens the native SMS composer prefilled with the recipients and message body you provide, and the user always reviews the message and decides whether to send it. This makes the plugin privacy-friendly and avoids the need for any SMS permissions.

Why is the status always unknown on Android?

On Android, the system does not report whether the message was sent after the composer is dismissed, so the status is always unknown. On iOS, the status reflects the actual outcome (sent or canceled). See Result Status for details.

How can I detect devices that cannot send SMS messages?

Call the canComposeSms method, which resolves with canCompose set to false on devices without SMS capability, such as Wi-Fi-only tablets or iPads. If you call composeSms on such a device anyway, the call rejects as unavailable.

Why does prefilling multiple recipients not work in some Android messaging apps?

On Android, multiple recipients are joined with a semicolon (;) in the underlying smsto: URI, but some messaging apps expect a comma (,) instead. Multi-recipient prefilling may therefore not work reliably across all Android messaging apps. See Multiple Recipients for details.

Is any additional configuration required on Android?

No, the plugin works out of the box. It declares the necessary <queries> element for the smsto scheme in its own AndroidManifest.xml, so the SMS capability can be detected on Android 11 (API level 30) and higher without manual manifest changes.

Can I use this plugin with Ionic, React, Vue or Angular?

Yes, the plugin is framework-agnostic. It works in any Capacitor app regardless of the web framework, including Ionic with Angular, React, or Vue, as well as plain JavaScript projects.

Related Plugins

Newsletter

Stay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our Capawesome Newsletter.

Changelog

See CHANGELOG.md.

License

See LICENSE.