Skip to content

Commit

Permalink
switch to cordova-plugin-inappbrowser
Browse files Browse the repository at this point in the history
  • Loading branch information
westonganger committed Mar 2, 2016
1 parent 11e33cc commit 1f7289c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ under the License.

<dependency id="cordova-plugin-dialogs"/>
<dependency id="cordova-plugin-globalization"/>
<dependency id="cordova-plugin-inappbrowser"/>

<js-module src="www/AppRate.js" name="AppRate">
<clobbers target="AppRate"/>
Expand All @@ -49,8 +50,6 @@ under the License.

<!-- android -->
<platform name="android">
<dependency id="org.apache.cordova.inappbrowser"/>

<source-file src="src/android/AppRate.java" target-dir="src/org/pushandplay/cordova/apprate"/>

<config-file target="res/xml/config.xml" parent="/*">
Expand Down
8 changes: 4 additions & 4 deletions www/AppRate.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,14 @@ AppRate = (function() {
} else {
iOSVersion = navigator.userAgent.match(/OS\s+([\d\_]+)/i)[0].replace(/_/g, '.').replace('OS ', '').split('.');
iOSVersion = parseInt(iOSVersion[0]) + (parseInt(iOSVersion[1]) || 0) / 10;
window.open(PREF_STORE_URL_FORMAT_IOS + this.preferences.storeAppURL.ios, '_system');
cordova.InAppBrowser.open(PREF_STORE_URL_FORMAT_IOS + this.preferences.storeAppURL.ios, '_system');
}
} else if (/(Android)/i.test(navigator.userAgent.toLowerCase())) {
window.open(this.preferences.storeAppURL.android, '_system');
cordova.InAppBrowser.open(this.preferences.storeAppURL.android, '_system');
} else if (/(BlackBerry)/i.test(navigator.userAgent.toLowerCase())) {
window.open(this.preferences.storeAppURL.blackberry, '_system');
cordova.InAppBrowser.open(this.preferences.storeAppURL.blackberry, '_system');
} else if (/(IEMobile|Windows Phone)/i.test(navigator.userAgent.toLowerCase())) {
window.open(this.preferences.storeAppURL.windows8, '_system');
cordova.InAppBrowser.open(this.preferences.storeAppURL.windows8, '_system');
}
return this;
};
Expand Down

0 comments on commit 1f7289c

Please sign in to comment.