sms

package
v0.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package sms opens the system's screen for writing a text message, filled in, for them to check and send. Nothing is sent without them.

nimbus native plugin add sms

status, err := sms.Compose(ctx, sms.Options{To: []string{"+912012345678"}, Body: "Table for two at 8?"})

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available(ctx context.Context) bool

Available reports whether this phone can send texts.

Types

type Options

type Options struct {
	To   []string `json:"to,omitempty"`   // the phone numbers
	Body string   `json:"body,omitempty"` // the message
}

Options is what to fill in.

type Status

type Status string

Status is what they did.

const (
	Sent      Status = "sent"      // it was sent
	Cancelled Status = "cancelled" // they backed out
	// Unknown is every answer on Android, which can't tell.
	Unknown Status = "unknown"
)

func Compose

func Compose(ctx context.Context, o Options) (Status, error)

Compose opens the screen and returns when it closes. With no messages app it fails with plugin.Unavailable.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL