Created
August 20, 2015 14:07
-
-
Save francisrod01/e100b737c708c23c0c22 to your computer and use it in GitHub Desktop.
SMS Send with Ionic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ion-view view-title="SMS"> | |
<ion-content> | |
{{ sendStatus }} | |
</ion-content> | |
</ion-view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.controller('SmsCtrl', function($scope) { | |
if (SMS) { | |
var _phoneNumbers = '+554192292992'; // numero de teste com codigo do Brasil e DDD | |
SMS.sendSMS(_phoneNumbers, "hello, Francis!", function() { | |
console.log('watching!'); | |
$scope.sendStatus = 'Watching!'; | |
}, function() { | |
console.log('not watching!'); | |
$scope.sendStatus = 'Not watching!'; | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment