Skip to content

Instantly share code, notes, and snippets.

@francisrod01
Created August 20, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save francisrod01/e100b737c708c23c0c22 to your computer and use it in GitHub Desktop.
Save francisrod01/e100b737c708c23c0c22 to your computer and use it in GitHub Desktop.
SMS Send with Ionic
<ion-view view-title="SMS">
<ion-content>
{{ sendStatus }}
</ion-content>
</ion-view>
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