How to use nativescript-phone - 3 common examples

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);
                }
            });
        }
    }
}
github sean-perkins / nativescript-petfinder / app / +match / components / match-detail / match-detail.component.ts View on Github external
title: 'Error',
                                message: 'There was an issue sending the email.',
                                okButtonText: 'Ok'
                            });
                        });
                    }, () => {
                        dialogs.alert({
                            title: 'Error',
                            message: 'Email is not available',
                            okButtonText: 'Ok'
                        });
                    });
                }
                else if (selectedAction.startsWith('Call')) {
                    const formattedPhone = contact.phone.replace(/ /g, '').replace(/["'()]/g, '').replace(/-/g, '');
                    phone.dial(formattedPhone, true);
                }
            }
        });
    }
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 3 years ago

Package Health Score

52 / 100
Full package analysis

Popular nativescript-phone functions