How to make a Dynamic Listview Using WebViewer NO-JSON


#1

Please read first.
http://community.appybuilder.com/t/how-to-make-a-dynamic-listview-using-webviewer-json/

Again the same theme, but this time, without the need for JSON, which is why fewer blocks are used, and everything is developed in a cleaner way.

what I have done is send the data to the html file in CSV format, separated by commas and line breaks

Example:

Line1
https://www.shareicon.net/data/2016/10/11/841490_glasses_512x512.png,Boss,a,b,c,d,1\n

Line2
https://www.iconexperience.com/_img/g_collection_png/standard/256x256/delivery_man_parcel.png,Worker,a,b,c,d,2

line2 does not end in \n because it is the last data and there are no more lines after it. even so if you make a mistake and put a \n at the end, the code corrects that error.

The solution to not have to use JSON, I do it in the html file just look and study it.

@Taifun

listview_NOJSON.aia (33.1 KB)


Endless Picture - like listview
#2

you might want to test the project using the apk file on another device(!) to find out, that it does not work anymore…

the following tip might help…

Yes, you also can upload html files as assets into App Inventor! There is only one special thing to consider: During development, you have to use the development path to the embedded html document:

file:///mnt/sdcard/AppInventor/assets/<NAME OF YOUR HTML FILE>.html

Before packaging the app, use the production path.

file:///android_asset/<NAME OF YOUR HTML FILE>.html

alternatively use the PathToAssets method from the tools extension…
PathToAssets

Taifun


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


#3

Interesting tutorial, @condigital… Thank you,

Yes, json is not as easy to read as csv row format. Me too, like it this way when transferring data.


#4

I can not make this work… anyone achieved it? the AIA is correctly installed, but the webviewer doesn’t shows anything. Do i have to change anything to the AIA file itself? Thanks


#5

you might want to read my previous answer
Taifun


#6

Thanks, but i already used PathToAssets with same results


#7

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

Taifun


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


#8

Where is the html file i need


#9

you can find it in the assets of the example project and you can find that example project in the first post in this thread
Taifun


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


#10

Hi, sorry for delay. I was able to make it run on development, using the AI companion, but when i generate an APK and install it, the part of the screen where the HTML should be shown is empty… everything else on the page is loaded, but the space for the webviewer remains empty… I used the path to assets to make sure is pointing to the right path, and added as media files ef.js, materialize,min.css and the dynamic***json.html file. What am i missing? Thanks


#11

Are you testing with Android 4.X …?


#12

Android 5 for testing : OK, when created the APK and installed it: ERROR (don’t see nothing)
Android 8 for testing : OK, when created the APK and installed it: OK
Should i assume that BUILD --> Provide QR for .APK is not working on some android versions? Wich ones? and how should i set my APK working on small android versions?

Thanks for your time


#13

The code I provide in this example does not work on android versions below 5.


#14

Ok, didn’t know that. And in Android v5 doesn’t seems to work for me either.
Anyway, is there any solution out there that works with all versions of android? (or at least with version 4 and further)?
Thanks


#15

Hello, I really do not have time to review your code and correct it, but I have android 5 works perfectly …
in build and in companion