I am building a F7 app but when i compile it to .apk, it does not boot it to the index page, unless the app is minimizied.
APP.JS
var $$ = Dom7;
var app = new Framework7({
root: '#app', // App root element
id: 'io.framework7.myapp', // App bundle ID
name: 'Gazelle', // App name
theme: 'auto', // Automatic theme detection
// App root data
data: function () {
return {
user: {
firstName: 'John',
lastName: 'Doe',
},
};
},
// App root methods
methods: {
helloWorld: function () {
app.dialog.alert('Hello World!');
}
},
// App routes
routes: routes,
// Input settings
input: {
scrollIntoViewOnFocus: Framework7.device.cordova && !Framework7.device.electron,
scrollIntoViewCentered: Framework7.device.cordova && !Framework7.device.electron,
},
// Cordova Statusbar settings
statusbar: {
iosOverlaysWebView: true,
androidOverlaysWebView: false,
},
on: {
init: function () {
var f7 = this;
if (f7.device.cordova) {
// Init cordova APIs (see cordova-app.js)
cordovaApp.init(f7);
}
},
},
});
var view = app.views.create(".view-main",{
url: '/'
});
var swiper = app.swiper.create('.swiper-container', {
speed: 400,
spaceBetween: 0
});
$$("#ob-one").on("click",function(){
swiper.slideNext();
});
$$("#ob-two").on("click",function(){
swiper.slideNext();
});
$$("#ob-three").on("click",function(){
app.dialog.alert("This is the first test", "Just testing");
});
ROUTES.JS
var routes = [
** {**
** path: ‘/’,**
** url: ‘./index.html’,**
** },**
** {**
** path: ‘/onboarding-two/’,**
** url: ‘./pages/user/onboarding-two.html’,**
** },**
** {**
** path: ‘/onboarding-three/’,**
** url: ‘./pages/user/onboarding-three.html’,**
** },**
** {**
** path: ‘/about/’,**
** url: ‘./pages/about.html’,**
** },**
** {**
** path: ‘/form/’,**
** url: ‘./pages/form.html’,**
** },**
You can install the app and try it out here