From 4b2e781002a3ae3b69bb796819660cee0754b340 Mon Sep 17 00:00:00 2001 From: Joshua Estrin Skrzypek Date: Mon, 8 Jun 2015 16:33:44 +0300 Subject: [PATCH] feat(app): Check Android with $ionicApp.getDeviceTypeByNavitor() Closes #13 --- ionic-deploy.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ionic-deploy.js b/ionic-deploy.js index d35fb87..123762d 100644 --- a/ionic-deploy.js +++ b/ionic-deploy.js @@ -259,7 +259,7 @@ angular.module('ionic.service.deploy', ['ionic.service.core']) return deferred.promise; } - } + }; }]) .run(['$ionicApp', function($ionicApp) { @@ -269,11 +269,11 @@ angular.module('ionic.service.deploy', ['ionic.service.core']) function onDeviceReady() { console.log("Ionic Deploy: Init"); if (typeof IonicDeploy != "undefined") { - if (ionic.Platform.isAndroid()) { + if ($ionicApp.getDeviceTypeByNavigator() === 'android') { IonicDeploy.init($ionicApp.getApp().app_id); } else { IonicDeploy.redirect($ionicApp.getApp().app_id); } } - }; + } }]);