this.sms.send(9191919191, 'Hi this is dummy msg')
.then(() => {
alert('The Message is sent');
}).catch((error) => {
console.log('The Message is Failed', error);
alert('Error:- ' + error);
});我需要发送短信到相应的手机号码,但当我运行应用程序时,它显示用户拒绝您的权限错误hoe解决此问题,请帮助我
发布于 2019-12-05 20:29:37
通过读取documentation,电话号码应该用单引号引起来,尝试这样做:
this.sms.send('9191919191', 'Hi this is dummy msg')
.then(() => {
alert('The Message is sent');
}).catch((error) => {
console.log('The Message is Failed', error);
alert('Error:- ' + error);
});别忘了注入你的构造函数:constructor(private sms: SMS) { }
https://stackoverflow.com/questions/59194008
复制相似问题