Open LaurentMazare opened 3 months ago
This is an area where integrating mobile tooling with dioxus would be very helpful (#2091). We currently add any assets you use with manganis or in the bundle.resources
section to the list of assets to bundle on desktop, but we don't add them to the manifest cargo-mobile2 uses
It looks like the config in cargo mobile2 accepts an assets directory which may be helpful here.
We may also need to either add extra logic to read assets on android or use the existing WebViewBuilderExtAndroid
trait in wry
Related issues:
Problem
I'm trying to bundle some data file in a dioxus app but when trying to access the file I get some file not found error. Not sure if this is supposed to be supported at the moment, also I might well be doing something pretty wrong here.
Steps To Reproduce
See this gist for a small repro.
Basically I created a
test.txt
file in my project directory, added the following to myCargo.toml
:And in the app code I'm trying to read the file via:
However when running the code on the android emulator, I get a
"No such file or directory"
error.Expected behavior
Hopefully I would get the content of the file when reading it :)
Screenshots
N/A
Environment:
The
JAVA_HOME
,ANDROID_HOME
, andNDK_HOME
environment variables are hopefully properly set.Questionnaire