mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-18 19:22:51 +08:00
1. User Agent detection now detects AmazonWebView.
2. Change to use amazon-fireos as the platform if user agent string contains 'cordova-amazon-fireos'
This commit is contained in:
parent
4590f2597c
commit
d8a3d2ff3a
6
test/cordova-incl.js
vendored
6
test/cordova-incl.js
vendored
@ -20,7 +20,9 @@
|
||||
*/
|
||||
|
||||
var PLAT;
|
||||
if (/Android/.exec(navigator.userAgent)) {
|
||||
if (/cordova-amazon-fireos/.exec(navigator.userAgent)) {
|
||||
PLAT = 'amazon-fireos';
|
||||
}else if (/Android/.exec(navigator.userAgent)) {
|
||||
PLAT = 'android';
|
||||
} else if (/(iPad)|(iPhone)|(iPod)/.exec(navigator.userAgent)) {
|
||||
PLAT = 'ios';
|
||||
@ -61,7 +63,7 @@ if (!window._doNotWriteCordovaScript) {
|
||||
}
|
||||
|
||||
function backHome() {
|
||||
if (window.device && device.platform && device.platform.toLowerCase() == 'android') {
|
||||
if (window.device && device.platform && (device.platform.toLowerCase() == 'android' || device.platform.toLowerCase() == 'amazon-fireos')) {
|
||||
navigator.app.backHistory();
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user