Skip to content

Ionic usage

Martin Reinhardt edited this page Apr 10, 2016 · 4 revisions

Within your existing Ionic project add the plugin

cordova plugin add cordova-plugin-hotspot

Integrate in your app, e.g:

// default to WPA2PSK
$scope.config = { mode: 'WPA2PSK' };
cordova.plugins.hotspot.isHotspotEnabled(
    function () {
        $ionicLoading.hide();
        $scope.isHotSpotActive = true;
    }, function () {
        $ionicLoading.hide();
        $scope.isHotSpotActive = false;
    }
);
Listing 1: Controller

Sample App is available here.

You need to make sure that you have the right Android permissions.

Clone this wiki locally