How to use the nativescript-phone.sms function in nativescript-phone

To help you get started, we’ve selected a few nativescript-phone examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NativeScript / nativescript-app-templates / packages / template-patient-care-ng / src / care / connect / connect-detail / connect-detail.component.ts View on Github external
onInfoButtonTap(contactInfo: ContactInfo) {
        const phone = contactInfo.displayString.replace(/\s/g, "");

        if (contactInfo.type === 0) {
            phoneModule.dial(phone, true);
        } else if (contactInfo.type === 1) {
            phoneModule.sms([phone], "");
        } else {
            const composeOptions: email.ComposeOptions = {
                to: [contactInfo.displayString]
            };

            email.available().then((available: boolean) => {
                if (available) {
                    email.compose(composeOptions);
                }
            });
        }
    }
}

nativescript-phone

NativeScript plugin to use the device phone and SMS features for Android and iOS

MIT
Latest version published 2 years ago

Package Health Score

54 / 100
Full package analysis

Popular nativescript-phone functions