hello all, i want to use f7 for my app in android version.
its perfect in the local browser but when i move it to android studio i face a blank screen.
i tested many way but all failed.
also i added these lines of code into my project but again faield!
app & dom7 object loading and i can print them by console.log without any error, but again white screen shows…
ws.javaScriptEnabled=true
ws.javaScriptCanOpenWindowsAutomatically=true
ws.javaScriptEnabled=true
ws.domStorageEnabled=true
ws.setAppCacheEnabled(true)
ws.allowFileAccessFromFileURLs=true
ws.allowUniversalAccessFromFileURLs=true
ws.databaseEnabled=true
ws.allowContentAccess=true
im using latest version of f7, 6+ and my sdk version 19-31, , my android version is 10
thank you
anybody is here ??
how can i debug this problem ?
this is my app init, it return “App initialized” but still the page is blank!
var app = new Framework7({
el: '#app',
name: 'My App',
id: 'com.myapp.test',
panel: {
swipe: true,
},
routes: [
{
path: '/about/',
url: 'about.html',
},
],
on: {
init: function () {
console.log('App initialized');
},
pageInit: function () {
console.log('Page initialized');
},
}
});
I can only suggest to connect your device to computer and use remote debugging in Chrome to see maybe there are some errors in console
thank you for your response ,
but there is no error in my log and even i can run this code
var device = Framework7.getDevice();
alert(JSON.stringify(device));
and the result you see in the picture.
i tried several ways like activating asset loader in android, but nothing happend.
after adding css to the page, the page will going to be blank.
when i change webview history and address multiple times, it give me such this error :
webview baseUrl = “”
Uncaught TypeError: Cannot read properties of undefined (reading ‘split’) at 11673 of https://x.yz/assets/app/framework7-bundle.js
but when the baseUrl=“file:///android_asset/” there is no error, but still the page is blank
i chekced both F7 and onsen demo page on webview diectly but none of them open on webview.
both of them goes blank and i dont know why!
finally found the answer!
for those who will have problem same as me :
when we using webview with nestedscrollview the webview’s height is set to wrap_content and this cause problem. we must use an absolute height for webview.