Hello everyone,
I’m having some trouble with SMS plugin from ngCordova. If I send a message with the intent option set to ‘INTENT’, everything works fine, prompting the SMS application installed. But, when I set intent to ’ ’ (to use android’s native SMS sender), my app crashes. Here’s the code:
$scope.executeCommand = function(resource){
var options = {
replaceLineBreaks: false,
android: {
intent: ''
}
};
$cordovaSms
.send(resource.telephonenumber, resource.command, options)
.then(function() {
$scope.showAlert('Success', 'Command executed successfully!');
}, function(error) {
$scope.showAlert('Error', 'Command could not be executed. Try again later.');
});
Also, when I install the apk, no permissions are asked (I think it should ask for the SEND_SMS permission). Any suggestions?