HTML asset not displayed in webview android 7 and above

108 views
Skip to first unread message
Assigned to ewpa...@gmail.com by carte...@gmail.com

akash2386

unread,
Aug 22, 2018, 12:58:46 PM8/22/18
to MIT App Inventor Forum
Hi to all developers,

In my last question (https://groups.google.com/forum/#!category-topic/mitappinventortest/emulator/TrvENV_UN9w ) I had tried the Taifun Html read apk in above android 7 version it was running.

But my question is that my DOL starter apk(https://play.google.com/store/apps/details?id=appinventor.ai_akash_kumar_mandal.DOLStarter&hl=en_IN) is running in android 6.X version but not running or html as asset loading problem exist in above android 7.X.. 

please guide me.


blocks.png

Taifun

unread,
Aug 22, 2018, 1:51:35 PM8/22/18
to MIT App Inventor Forum
are you saying, the example project  https://puravidaapps.com/snippets.php#2htmlread  is not running on Android 7+?
can you elaborate?
Taifun

akash2386

unread,
Aug 23, 2018, 12:33:47 AM8/23/18
to MIT App Inventor Forum
@Taifun
Your htmlread apk is running in android7+.

I am discussing about my apk.it will running in android6. But not running in android 7+.

HTML asset not loading in android 7+

Taifun

unread,
Aug 23, 2018, 9:04:01 AM8/23/18
to MIT App Inventor Forum
how did you upload the assets?
can you provide the html source code of DOL.html?
Taifun

akash2386

unread,
Aug 24, 2018, 6:05:03 AM8/24/18
to MIT App Inventor Forum
@Taifun

Thanking for kind response 


I attached the DOL1.html. please find attachment.


dol1.html

TimAI2

unread,
Aug 24, 2018, 6:58:24 AM8/24/18
to MIT App Inventor Forum
Tested your html file in a simple compiled app as per Taifun's example on Nexus 6 Android 7.0 (genymotion emulator)

html displays fine (could do with some css/html code to resize table to fit window/screen) 

testdolblocks.png


akash2386

unread,
Aug 24, 2018, 8:18:49 AM8/24/18
to MIT App Inventor Forum
Thank you ...but when I installed in android 7 and above version HTML was not displaying...


Ya...I will think for CSS..

Evan Patton

unread,
Aug 24, 2018, 9:14:16 AM8/24/18
to MIT App Inventor Forum
I believe that asset names should be case sensitive. In your blocks code you show DOL.html but the file is dol1.html. If you make the case all the same does it resolve the issue?

Regards,
Evan

akash2386

unread,
Aug 24, 2018, 10:28:29 AM8/24/18
to MIT App Inventor Forum
Thanks @Evan

Actually I upload dol1.HTML for sample for my actually code.

The apk is supporting in android 6 but not working in android 7 and above versions...

akash2386

unread,
Aug 24, 2018, 10:57:43 AM8/24/18
to MIT App Inventor Forum
Output is coming like when I checked in android 8
IMG-20180824-WA0013.jpg

Taifun

unread,
Aug 24, 2018, 10:59:48 AM8/24/18
to MIT App Inventor Forum
Please prepare an example as small as possible, which demonstrates this issue and add the project (aia file) into this thread 
how should the result look like? how does it look instead? you might want to provide some screenshots...

Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 

akash2386

unread,
Aug 24, 2018, 10:59:50 AM8/24/18
to MIT App Inventor Forum
https://goo.gl/33inqP


Designed DOL starter Sizing calculator app.please click in above Google play store link to download☝

akash2386

unread,
Aug 24, 2018, 11:08:05 AM8/24/18
to MIT App Inventor Forum
@taifun

Attached screenshoot of the output of apk.

IMG-20180824-WA0013.jpg

TimAI2

unread,
Aug 24, 2018, 11:54:40 AM8/24/18
to MIT App Inventor Forum
Please provide aia file of your app on Google Play here.

akash2386

unread,
Aug 26, 2018, 5:19:16 AM8/26/18
to MIT App Inventor Forum
@@TimAI2 
I attached DOLStarter.aia 

Please Check....

Thank You

DOLStarter.aia

TimAI2

unread,
Aug 26, 2018, 7:14:11 AM8/26/18
to MIT App Inventor Forum
OK, after some extensive testing, timing/single screen/urls/builds,  this appears to be a "GooglePlay" (API26) build bug.

If the app is built using Legacy, then the webviewer works for normal urls and asset files.

If the app is built for GooglePlay (API 26) then the webviewer will not display either.

Testing done on Nexus 6 API 24 (Android 7.0) Genymotion emulator

Assigned to MIT

~~~~~~~~~~~~~~~~~~~~

If you want to continue with app, for now suggest you replicate your DOL.html javascript in blocks, shouldn't take too long ....

Evan Patton

unread,
Aug 27, 2018, 12:19:27 PM8/27/18
to MIT App Inventor Forum
So I tested this as well. The problem is not the HTML, that works fine, the problem is in the layout. CalculationSheet has its Scrollable property set to true, and with the WebViewer height set to FillParent, it ends up being 0 height. If I disable the scrollable property, it gets the (roughly) appropriate height and you can see the form. It is likely therefore that an API change in SDK 24 broke how the fill parent gets computed in a scrollable view group. It might take some time for us to track this down and come up with a working solution.

Cheers,
Evan

Evan Patton

unread,
Aug 27, 2018, 12:24:54 PM8/27/18
to MIT App Inventor Forum
Now being tracked as issue #1344.

Evan

TimAI2

unread,
Aug 27, 2018, 1:28:48 PM8/27/18
to MIT App Inventor Forum
Thanks Evan

Missed that one in my "extensive testing" ;)

akash2386

unread,
Aug 28, 2018, 5:57:35 AM8/28/18
to MIT App Inventor Forum
@Evan thanks
Can you tell in detail please

TimAI2

unread,
Aug 28, 2018, 5:17:20 PM8/28/18
to MIT App Inventor Forum
Try the attached aia.

As Evan says the problem was with the scrollable screens.

I have updated your aia to provide vertical scrolling arrangements instead, and this works for your html page.
I also changed your screen switching method on Calculation Sheet to prevent memory crash

Let us know how it works for you
DOLStarterRevised.aia

akash2386

unread,
Aug 29, 2018, 5:46:23 AM8/29/18
to MIT App Inventor Forum
thanks alot...


i will check and update you soon

akash2386

unread,
Aug 30, 2018, 1:54:11 PM8/30/18
to MIT App Inventor Forum
Still same problem...

TimAI2

unread,
Aug 30, 2018, 7:00:36 PM8/30/18
to MIT App Inventor Forum
Sorry, forgot to test as a compiled app :(

TimAI2

unread,
Aug 31, 2018, 1:03:42 PM8/31/18
to MIT App Inventor Forum
My memory! (why i have to write everything down!)
I did test a compiled version previously, but obviously not working for you.
Had another go, allowing the webviewer to do any scrolling needed.
This works as a compiled app (Google Play) for me

Let me know how you get on.
DOLStarterRevised.aia

akash2386

unread,
Sep 2, 2018, 11:45:28 PM9/2/18
to MIT App Inventor Forum
Thanks TimAI2

It is working in android 7.

TimAI2

unread,
Sep 3, 2018, 1:25:24 PM9/3/18
to MIT App Inventor Forum
:)
Reply all
Reply to author
Forward
0 new messages