Open MusienkoAnton opened 3 months ago
I need to show local page "ticket.html" in WebView at Android app. I right simple code and build apk from Windows:
flet build apk --include-packages flet_webview --build-version "0.1.10" --verbose
APK build OK. I try to run at Android phone and see only grey(screenshot)
import flet as ft
def main(page: ft.Page): wv = ft.WebView( url="ticket.html", expand=True, on_pagestarted=lambda : print("Page started"), on_pageended=lambda : print("Page ended"), on_web_resource_error=lambda e: ft.Text(e.data), ) page.add(wv)
ft.app(main)
Save code at main.py, put near main.py simple ticket.html (with all tags like:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <meta http-equiv=Content-Type content="text/html; charset=utf-8"> <HTML> <BODY> <STYLE>
Build apk using:
install and run apk on Android phone
I try to change dir of ticket.html is:
Linux
Android 14
0.22.1
I'm not sure / I don't know
No response
Also facing same issue any solution
Duplicate Check
Describe the bug
I need to show local page "ticket.html" in WebView at Android app. I right simple code and build apk from Windows:
APK build OK. I try to run at Android phone and see only grey(screenshot)
Code
import flet as ft
def main(page: ft.Page): wv = ft.WebView( url="ticket.html", expand=True, on_pagestarted=lambda : print("Page started"), on_pageended=lambda : print("Page ended"), on_web_resource_error=lambda e: ft.Text(e.data), ) page.add(wv)
ft.app(main)
To reproduce
Save code at main.py, put near main.py simple ticket.html (with all tags like:
Build apk using:
install and run apk on Android phone
Expected behavior
I try to change dir of ticket.html is:
Screenshots
Operating System
Linux
Operating system details
Android 14
Flet version
0.22.1
Regression
I'm not sure / I don't know
Suggestions
No response
Additional details
No response