Android 应用程序问题

Android 应用程序问题,android,cordova,Android,Cordova,大家好,Stackoverflow 我在预装我用HTML5/CSS构建的应用程序时遇到了一些问题,这肯定是我的代码,但是它在IOS而不是Android上无缝工作 我知道安卓系统仍存在一些问题,但我的客户实际上正在为此翻墙 我想这与我在application.js中的代码有关,我附上了一把小提琴,看看是否有人能帮我 如果有人能为我指出下一步该做什么以及如何克服这个问题的正确方向,我将不胜感激 Joe您正在测试哪一版本的Android?Appgyver之前对Android的支持并不是最好的,但他

大家好,Stackoverflow

我在预装我用HTML5/CSS构建的应用程序时遇到了一些问题,这肯定是我的代码,但是它在IOS而不是Android上无缝工作

我知道安卓系统仍存在一些问题,但我的客户实际上正在为此翻墙

我想这与我在application.js中的代码有关,我附上了一把小提琴,看看是否有人能帮我

如果有人能为我指出下一步该做什么以及如何克服这个问题的正确方向,我将不胜感激


Joe

您正在测试哪一版本的Android?Appgyver之前对Android的支持并不是最好的,但他们正在对该平台进行全面的检修。另外,你最好在网上问这个问题,因为实际的开发人员和支持人员会在那里帮助你做任何事情。我想你可以再试试。AppGyver Android client 4.x已经推出一段时间了,它比2014年4月的旧版本要好得多。
 //Rotation
window.onload = function () {

    steroids.view.setAllowedRotations({
        allowedRotations: [0, 180]
    }, {
        onSuccess: function () {
            alert("Portait View.");
        }
    });

}
//Scroller
window.onload = function () {

    var myScroll;

    function loaded() {
        myScroll = new IScroll('#content-padded', {
            bounceEasing: 'elastic',
            bounceTime: 1200,
            mouseWheel: true,
            scrollbars: true,
            snap: true
        });
    }
    document.addEventListener('touchmove', function (e) {
        e.preventDefault();
    }, false);
}
// Loads Home Layer
function showHome() {
    var showView = new steroids.views.WebView({
        location: "index.html"
    });
    //  Pushes The Home Layer
    steroids.layers.push({
        view: showView,
        keepLoading: false,
        navigationBar: false,
        tabBar: false,
        animation: false
    });
}
// Loads Prices Layer
function showPrices() {
    var showView = new steroids.views.WebView({
        location: "prices.html"
    });
    //  Pushes The Prices Layer
    steroids.layers.push({
        view: showView,
        keepLoading: false,
        navigationBar: false,
        tabBar: false,
        animation: false
    });
}
// Loads 
function showRides() {
    var showView = new steroids.views.WebView({
        location: "rides.html"
    });
    //  Pushes The Rides Layer
    steroids.layers.push({
        view: showView,
        keepLoading: false,
        navigationBar: false,
        tabBar: false,
        animation: false
    });
}
// Show a custom alert
//
function showBook() {
    navigator.notification.alert(
        'You are now being directed to our website, to confirm please click below', // message
    showBook2, // callback
    'Diggerland', // title
    'Confirm' // buttonName
    );
}
// Loads In App Browser (Book Tickets) 
function showBook2() {
    window.open('https://www.diggerland.com/bookings/site/book/1/', '_blank', 'location=yes');
}
// Loads Dates Layer
function showDates() {
    var showView = new steroids.views.WebView({
        location: "dates.html"
    });
    //  Pushes The Dates Layer
    steroids.layers.push({
        view: showView,
        keepLoading: false,
        navigationBar: false,
        tabBar: false,
        animation: false
    });
}
// Loads Find Us Layer
function showFindus() {
    var showView = new steroids.views.WebView({
        location: "findus.html"
    });
    //  Pushes The Find Us Layer
    steroids.layers.push({
        view: showView,
        keepLoading: false,
        navigationBar: false,
        tabBar: false,
        animation: false
    });
}

function showGift() {
    navigator.notification.alert(
        'You are now being directed to our website, to confirm please click below', // message
    showGift2, // callback
    'Diggerland', // title
    'Confirm' // buttonName
    );
}
// Loads In App Browser (Gift Voucher) 
function showGift2() {
    window.open('https://www.diggerland.com/booking/vouchers.htm', '_blank', 'location=yes');
}
// Loads Groups Layer
function showGroups() {
    var showView = new steroids.views.WebView({
        location: "groups.html"
    });
    //  Pushes The Groups Layer
    steroids.layers.push({
        view: showView,
        keepLoading: false,
        navigationBar: false,
        tabBar: false,
        animation: false
    });
}
// Loads Fan Club Layer
function showSpecial() {
    var showView = new steroids.views.WebView({
        location: "special.html"
    });
    //  Pushes The Special Layer
    steroids.layers.push({
        view: showView,
        keepLoading: false,
        navigationBar: false,
        tabBar: false,
        animation: false
    });
}
// Loads Fan Club Layer
function showFanclub() {
    var showView = new steroids.views.WebView({
        location: "fanclub.html"
    });
    //  Pushes The Special Layer
    steroids.layers.push({
        view: showView,
        keepLoading: false,
        navigationBar: false,
        tabBar: false,
        animation: false
    });
}
// Loads Links Layer
function showLinks() {
    var showView = new steroids.views.WebView({
        location: "links.html"
    });
    //  Pushes The Links Layer
    steroids.layers.push({
        view: showView,
        keepLoading: false,
        navigationBar: false,
        tabBar: false,
        animation: false
    });
}
// Loads Newsletter Layer
function showNewsletter() {
    var showView = new steroids.views.WebView({
        location: "newsletter.html"
    });
    //  Pushes The Newsletter Layer
    steroids.layers.push({
        view: showView,
        keepLoading: false,
        navigationBar: false,
        tabBar: false,
        animation: false
    });
}
// Loads About Layer
function showAbout() {
    var showView = new steroids.views.WebView({
        location: "about.html"
    });
    //  Pushes The About Layer
    steroids.layers.push({
        view: showView,
        keepLoading: false,
        navigationBar: false,
        tabBar: false,
        animation: false
    });
}
// Loads Social Layer
function showSocial() {
    var showView = new steroids.views.WebView({
        location: "social.html"
    });
    //  Pushes The Social Layer
    steroids.layers.push({
        view: showView,
        keepLoading: false,
        navigationBar: false,
        tabBar: false,
        animation: false
    });
}
// Loads Contact Layer
function showContact() {
    var showView = new steroids.views.WebView({
        location: "contact.html"
    });
    //  Pushes The Contact Layer
    steroids.layers.push({
        view: showView,
        keepLoading: false,
        navigationBar: false,
        tabBar: false,
        animation: false
    });
}

// Useful Links 
// Loads Masterhitch
function loadDiggerland() {
    window.open('http://www.diggerland.com', '_blank', 'location=yes');
}
// Loads Masterhitch
function loadDiggerlandBlog() {
    window.open('http://www.diggerland.com/diggerland_blog', '_blank', 'location=yes');
}
// Loads HE Website 
function loadHE() {
    window.open('http://www.heservices.co.uk', '_blank', 'location=yes');
}
// Loads HE Blog
function loadHEBlog() {
    window.open('http://www.heservices.co.uk/blog/', '_blank', 'location=yes');
}
// Loads Buy A Digger
function loadBuyADigger() {
    window.open('http://www.buyadigger.com', '_blank', 'location=yes');
}
// Loads Masterhitch
function loadMasterhitch() {
    window.open('http://www.masterhitch.co.uk', '_blank', 'location=yes');
}


// Social Media
// Loads Facebook 
function showFB() {
    window.open('http://www.facebook.com/diggerland', '_blank', 'location=yes');
}
// Loads Facebook 
function showTwitter() {
    window.open('http://www.twitter.com/diggerland_uk', '_blank', 'location=yes');
}

// Loads Facebook 
function showYoutube() {
    window.open('http://www.youtube.com/diggerland', '_blank', 'location=yes');
}

// Loads Facebook 
function showGoogleplus() {
    window.open('https://plus.google.com/117194821273482641459', '_blank', 'location=yes');
}
//emailHQ
function emailHQ() {
    navigator.notification.alert(
        'You are now being re-directed away and will close the app, to confirm please click below', // message
    emailHQ2, // callback
    'Diggerland', // title
    'Confirm' // buttonName
    );
}

function emailHQ2() {
    window.location.href = "mailto:mail@diggerland.com?subject=Hi, Diggerland!";
}

function showTerms() {
    window.open('http://www.diggerland.com/groups/groups.htm', '_blank', 'location=yes');
}
// Get There Functions 
function get2Devon() {
    window.open('https://www.google.co.uk/maps/dir//Diggerland,+Verbeer+Manor,+Willand,+Cullompton,+Devon+EX15+2PE/@50.8776498,-3.37899,17z/data=!4m13!1m4!3m3!1s0x486d9678e0520b9f:0x53301ff615bbe9be!2sDiggerland!3b1!4m7!1m0!1m5!1m1!1s0x486d9678e0520b9f:0x53301ff615bbe9be!2m2!1d-3.37899!2d50.87765', '_blank', 'location=yes');
}

function get2Durham() {

    window.open('https://www.google.co.uk/maps/dir//Diggerland+Durham,+Langley+Park,+Co+Durham,+County+Durham+DH7+9TT/@54.8015144,-1.672773,17z/data=!4m12!1m3!3m2!1s0x487e7fb1498defeb:0xc11effaa3883f439!2sDiggerland+Durham!4m7!1m0!1m5!1m1!1s0x487e7fb1498defeb:0xc11effaa3883f439!2m2!1d-1.672773!2d54.801514', '_blank', 'location=yes');
}

function get2Kent() {
    window.open('https://www.google.co.uk/maps/dir//Diggerland+Kent,+Medway+Valley+Leisure+Park,+Roman+Way,+Strood,+Kent+ME2+2NU/@51.3832876,0.4799531,17z/data=!4m12!1m3!3m2!1s0x47d8cc88a2b9e70d:0xad7a119954a4d7af!2sDiggerland+Kent!4m7!1m0!1m5!1m1!1s0x47d8cc88a2b9e70d:0xad7a119954a4d7af!2m2!1d0.479085!2d51.382977', '_blank', 'location=yes');
}

function get2Yorkshire() {
    window.open('https://www.google.co.uk/maps/dir//Diggerland,+Willowbridge+Ln,+Castleford,+West+Yorkshire+WF10+5NW/@53.715696,-1.3824482,17z/data=!4m12!1m3!3m2!1s0x487969daab5232d1:0xa9dc523dcf5fe11b!2sDiggerland!4m7!1m0!1m5!1m1!1s0x487969daab5232d1:0xa9dc523dcf5fe11b!2m2!1d-1.382448!2d53.715696', '_blank', 'location=yes');
}
// Drawer 
window.onload = function () {

    var slideMenuButton = document.getElementById('slide-menu-button');
    slideMenuButton.onclick = function (e) {
        var cl = document.body.classList;
        if (cl.contains('right-nav')) {
            cl.remove('right-nav');
        } else {
            cl.add('right-nav');
        }
    };
}