📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

capacitor-sms-inbox

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capacitor-sms-inbox

A capacitor plugin to read SMS inbox

1.3.0
latest
Source
npm
Version published
Weekly downloads
15
25%
Maintainers
1
Weekly downloads
 
Created
Source

capacitor-sms-inbox

A capacitor plugin to read SMS inbox

Install

npm install capacitor-sms-inbox
npx cap sync android

API

  • checkPermissions()
  • requestPermissions()
  • getCount(...)
  • getSMSList(...)
  • getRawSMSList(...)
  • Interfaces
  • Type Aliases
  • Enums

checkPermissions()

checkPermissions() => Promise<PermissionStatus>

Returns: Promise<PermissionStatus>

requestPermissions()

requestPermissions() => Promise<PermissionStatus>

Returns: Promise<PermissionStatus>

getCount(...)

getCount(options: { filter?: SMSFilter; }) => Promise<{ count: number; }>
ParamType
options{ filter?: SMSFilter; }

Returns: Promise<{ count: number; }>

getSMSList(...)

getSMSList(options: { projection?: Projection; filter?: SMSFilter; }) => Promise<{ smsList: SMSObject[]; }>
ParamType
options{ projection?: Projection; filter?: SMSFilter; }

Returns: Promise<{ smsList: SMSObject[]; }>

getRawSMSList(...)

getRawSMSList(options: { filter?: SMSFilter; }) => Promise<{ rawSmsList: any; }>

Returns a raw sms object (all columns). Its like running SELECT * FROM ..

E.g.

{
  "_id": 33,
  "thread_id": 153,
  "address": "TEST",
  "person": null,
  "date": 1679232404564,
  "date_sent": 1679562604444,
  "protocol": 0,
  "read": 0,
  "status": -1,
  "type": 1,
  "reply_path_present": 0,
  "subject": null,
  "body": "SMS body",
  "service_center": "+918299901123",
  "locked": 0,
  "sub_id": 1,
  "error_code": 0,
  "creator": "com.google.android.apps.messaging",
  "seen": 1,
  "priority": -1
}

Note: This is a raw query and ineffecient. Use with caution

ParamType
options{ filter?: SMSFilter; }

Returns: Promise<{ rawSmsList: any; }>

Interfaces

PermissionStatus

PropType
smsPermissionState

SMSFilter

PropTypeDefault
typeMessageTypeMessageType.INBOX
idnumber
threadIdnumber
bodystring
bodyRegexstring
addressstring
addressRegexstring
minDatenumber
maxDatenumber
indexFromnumber
maxCountnumber

SMSObject

PropType
idnumber
threadIdnumber
typeMessageType
addressstring
creatorstring
personstring
datenumber
dateSentnumber
subjectstring
bodystring

Projection

PropTypeDefault
idbooleantrue
threadIdbooleantrue
typebooleantrue
addressbooleantrue
creatorbooleanfalse
personbooleanfalse
datebooleantrue
dateSentbooleanfalse
subjectbooleantrue
bodybooleantrue

Type Aliases

PermissionState

'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'

Enums

MessageType

MembersValue
ALL0
INBOX1
SENT2
DRAFT3
OUTBOX4
FAILED5
QUEUED6

Keywords

capacitor

FAQs

Package last updated on 05 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts