本文整理匯總了TypeScript中ionic-native.SMS類的典型用法代碼示例。如果您正苦於以下問題:TypeScript SMS類的具體用法?TypeScript SMS怎麽用?TypeScript SMS使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了SMS類的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!');
}