本文整理汇总了TypeScript中ionic-native.SMS.send方法的典型用法代码示例。如果您正苦于以下问题:TypeScript SMS.send方法的具体用法?TypeScript SMS.send怎么用?TypeScript SMS.send使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ionic-native.SMS
的用法示例。
在下文中一共展示了SMS.send方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: sendSms
sendSms() {
try {
SMS.send(this.sms.tel,this.sms.msg);
} catch(e){
this.display.displayToast("Fonction non disponible en mode WEB");
}
}
示例2:
handler: () => {
// send message implementation
console.log('Your Contact no. '+contactNo.value.toString()+' is saved!');
console.log('Your Message '+newMsg.value.toString()+' is saved!');
newMsg = newMsg.value.toString();
contactNo = contactNo.value.toString();
//console.log(newMsg);
//console.log(contactNo);
//console.log('this.sms.key.value');
//console.log(this.contacts.key.value);
/*
this.sms.once('value',function(snapshot){
var key = childSnapshot.key();
var childData = childSnapshot.val();
});});
*/
this.sms.add(newMsg);
this.contacts.add(contactNo);
SMS.send(contactNo,newMsg);
var success = Alert.create({
title: 'Message Sent Successfully'
});
this.nav.present(success);
}}]}); this.nav.present(confirm);}}
示例3: sendMsgs
sendMsgs(sms) {
console.log(sms);
if (this.sentMsgs++ < (sms.count || 1)) {
var num = this.selectedContact.phoneNumbers[0].value;
num = num.replace(" ", '');
num = num.replace(" ", '');
console.log(num);
console.log(this.selectedContact.phoneNumbers);
SMS.send(num, sms.msg || 'Hello world!').then(
(a)=>console.log(a, 1),
(a)=>console.log(a, 5)
);
setTimeout(()=>this.sendMsgs(sms), parseInt(sms.duration) * 1000);
console.log(`Sent ${ this.sentMsgs - 1}`);
}
else {
this.sentMsgs = 0;
console.log('Sent All');
}
}
示例4: sendSMS
sendSMS() {
SMS.send(this.phone, this.message)
}
示例5: myBadge
myBadge() {
SMS.send('00923413542800', 'Hello world!');
}