It is possible to include external data in AILiveCoplete (.csv or SQLive) ?

55 views
Skip to first unread message

Firak

unread,
Feb 3, 2014, 1:43:15 AM2/3/14
to appto...@googlegroups.com
My new app requires a list of "names" and "long description"   (20 item) that does not change.
Of cuures is possible to write 20 "lebels" or 20 filed  mdb databese inside the designer windows;
but I would prefer to write them in a table on the Computer and include this data inside AILive as a file. If is possible.
Instead of writing this data inside AI, mi desire is to upload a file .csv or SQLive olready filled with this fields.
Is somebody konw if this is possible?

( I found a example that is for AI1, I'm not confident if it can work in AI2 http://puravidaapps.com/importCSV.php . AI2 is not animoare a zip file, is not clear to me if AI2 has the same folders for including external files )

I somebody did some work like that?

Taifun

unread,
Feb 3, 2014, 9:17:11 AM2/3/14
to appto...@googlegroups.com
of course you can use that example, you only have to manually translate it from AI1 to AI2...
Taifun

Firak

unread,
Feb 3, 2014, 4:12:05 PM2/3/14
to appto...@googlegroups.com
Hi Taifun,
waht you menan for "translating"?
I think I can write the same blocks and HTML code in AI2.
But, my question is how to include the files HTML and CSV inside .
Can I include them by dragging them in the media designer space?
And - Is the path of the folder to poin to it the same? (
file:///android_asset/import.html)

Taifun

unread,
Feb 3, 2014, 4:29:09 PM2/3/14
to appto...@googlegroups.com
everything is the same, only a little bit different ;-)

But, my question is how to include the files HTML and CSV inside .
upload these files like other assets, too, e.g. images, videos, sounds, ...
 
And - Is the path of the folder to poin to it the same? (
file:///android_asset/import.html)
yes
TaIfun

Firak

unread,
Feb 3, 2014, 6:06:08 PM2/3/14
to appto...@googlegroups.com
Yes Talfun,
moare or less I understand the trick . And test it. see attacment.
The trick is that you can pass a string from HTML to the app , inside the "html page title" field.
The timer is needed for waitinig jevescript to run.
the rest is abut making list from a csv.
Cattura10.PNG

Firak

unread,
Mar 5, 2014, 2:12:42 AM3/5/14
to appto...@googlegroups.com
This code Loads a .csv list, split in 2 lists and store them in ThinyDatabase.
1-Load an html document, that inculdes the puravida javascript code that read a file (the .csv) and store in the page name parameter.
2- a timer wait few seconds for this process to be done.
3- retrieve the data form the page name of html, and a loop split the csv content in 2 list (name,description)
4- the 2 lists are stored in Database for future use.
see attachment.
Note. I discover that "back space" is ignored is is in the csv,
so was easy in a text editor to write the csv that includes almost 1000 words, in this way:
Name1, Descripition1,
Name2, Description2,
...........
Load1.PNG
Load2.PNG

Firak

unread,
Mar 5, 2014, 2:54:11 AM3/5/14
to appto...@googlegroups.com
Correction: "new line" is ignored. not back space


Il giorno mercoledì 5 marzo 2014 08:12:42 UTC+1, Firak ha scritto:

Note. I discover that "back space" is ignored is is in the csv,


Reply all
Reply to author
Forward
0 new messages