How to get data from device uuid and send it as sms in ionic framework


#1

Im developing a mobile app for a client and the main feature of the app is to fetch data from a device and send it via sms but im using cordova device plugin to get device uuid but dont know how to send it as sms, pls help. Thanks in advance


#2

you might use the socialsharing plugin:

There are examples to open sms-composer.


#3

Please im still newbie to ionic, this is my HTML:

<ion-content>
    <div class="card">
        <div class="item item-divider">
            Your device information!
        </div>
        <div class="item item-text-wrap">
            <ul class="list">
                <li class="item">
                    Manufacturer : {{manufacturer}}
                </li>
                <li class="item">
                    Model : {{model}}
                </li>
                <li class="item">
                    Platform : {{platform}}
                </li>
                <li class="item">
                    UUID : {{uuid}}
                </li>
            </ul>
        </div>
        <div class="item item-divider text-right">
            
        </div>
    </div>
</ion-content>
and my controller js :

angular.module(‘starter.controllers’, [])

.controller(‘AppCtrl’, function() {})

.controller(‘DeviceCtrl’, function($ionicPlatform, $scope, $cordovaDevice) {
$ionicPlatform.ready(function() {
$scope.$apply(function() {
// sometimes binding does not work! :confused:
if(window.StatusBar) {
// org.apache.cordova.statusbar required
StatusBar.styleDefault();
}
// getting device infor from $cordovaDevice
var device = $cordovaDevice.getDevice();

        $scope.manufacturer = device.manufacturer;
        $scope.model = device.model;
        $scope.platform = device.platform;
        $scope.uuid = device.uuid;

    });

});

})
with this above code i can get the device uuid but the problem now is how to send uuid info and send it as sms