From 8170b578c5506c106ad0248047f6ec878c45f94e Mon Sep 17 00:00:00 2001 From: Joshua Estrin Skrzypek Date: Mon, 8 Jun 2015 16:33:44 +0300 Subject: [PATCH] feat(app): Provide alternative check for android without ionic 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..920f24b 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 (ionic && ionic.Platform.isAndroid() || navigator.userAgent.toLowerCase().indexOf('android') > 0) { IonicDeploy.init($ionicApp.getApp().app_id); } else { IonicDeploy.redirect($ionicApp.getApp().app_id); } } - }; + } }]);