jm lat

unread,
Jul 13, 2017, 4:38:06 AM7/13/17
to MIT App Inventor Forum
Hello,

I refered to some posts:
https://groups.google.com/forum/#!searchin/mitappinventortest/Webviewer|sort:relevance/mitappinventortest/MuCDbyKtJSA/1fKFrd1bGQAJ
http://puravidaapps.com/snippets.php#2webviewstring


I understand that path to use is not the same depending on developpement state or not, but i try the code enclosed in a project with nothing else it works well, and in my project it doesn't ...file not fond!

I try both path
- file:///mnt/sdcard/AppInventor/assets/webviewstring.html
- file:///android_asset/webviewstring.html

only the second works in my test project but same error result in my app !
(note : with my explorer "Total commander" i can't see AppInventor directory neither android_asset !!!)

in both cases i use QRcode to transfer projects in my phone.

i only succed to make it works using a file and defining it it WebViewer1.HomeUrl




Auto Generated Inline Image 1
Auto Generated Inline Image 2

Ghica

unread,
Jul 13, 2017, 6:03:57 AM7/13/17
to MIT App Inventor Forum
What did you load as asset into app inventor?
Did you use the companion to test your app? You said QR code, but was this the compiled app or connecting to the companion?
A webviewstring is there to provide dynamic content, not something with <!DOCTYPE...

Maybe you could download Taifun's example, try that first, and then modify it to your needs.
Cheers, Ghica.

jm lat

unread,
Jul 13, 2017, 7:41:51 AM7/13/17
to MIT App Inventor Forum
Hello Ghica

I don't use compaion i use built App(provide QR code for .apk)
and scan the QR code with my phone.

Maybe you could download Taifun's example, try that first, and then modify it to your needs. That's what i've done and obtain results i talk about !


Ghica

unread,
Jul 13, 2017, 8:07:15 AM7/13/17
to MIT App Inventor Forum
You should use the Companion, it makes your life a lot easier. Then, when your app works, you can build it.
Look at the Taifun example again, to understand which path to use during development - using the Companion - and which path to use after you have built the app (like you have been doing).
And, load your html file as an asset. Your error message says it cannot find the file. That means it is really not there.
Cheers, Ghica.

jm lat

unread,
Jul 13, 2017, 12:16:03 PM7/13/17
to MIT App Inventor Forum
i first try to use companion but i use files wich are on my phone and i don't know how having a copy in companion that's why i built my app after each modifications !

Taifun

unread,
Jul 13, 2017, 12:47:23 PM7/13/17
to MIT App Inventor Forum
 but i use files wich are on my phone
???
the companion app is running on your device, so you also have access to these files...
as Ghica already said, you should try an example and get it running successfully, then adjust it to your needs

Taifun
Reply all
Reply to author
Forward
0 new messages