Socket
Book a DemoInstallSign in
Socket

nativescript-messenger

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativescript-messenger

A SMS Messenger NativeScript module for Android and iOS and Android

1.2.0
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

NativeScript Messenger

A NativeScript module providing an sms messaging action for iOS and Android.

Installation

Run tns plugin add nativescript-messenger

Usage

To use the messenger module you must first require() it.

var messenger = require( "nativescript-messenger" );

Method

####send: Sends a message to one or multiple recipients

Parameters
  • numbers: An array of phone number strings. Supports just one or multiple.
  • message: The body message.
  • subject: The subject message.
var messenger = require( "nativescript-messenger" );
var numbers = ["905-454-1234", "905-454-4321", "905-929-1122"];
messenger.send(numbers, "My message", "Subject of Message");

This method also returns a promise. Use as so to define actions after the user has either canceled or sent the message.

    messenger.send(["905-555-5555", "905-555-4444"], "this is body").then(function(args){
        console.log(args.response); 
        // either a string saying cancelled or sent
        console.log(args.message); 
        // just a string with more detail than response.
        
        /* you can do stuff here.. this happens back 
        in your app after the message window has 
        been dismissed */        
        
    }, function (e) {
        console.log("Error occurred " + e); 
        // e will show a vague error message.
    });    

Keywords

NativeScript

FAQs

Package last updated on 22 Aug 2016

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.