AI2LiveComplete Offline version and SQLITE

258 views
Skip to first unread message

Jean Baptiste Soubelet

unread,
Apr 2, 2014, 9:28:15 AM4/2/14
to appto...@googlegroups.com
Hi,

I'm impressed by the tool that was developed by Hossein.
I just wonder where we can find the Sqlite database of the created app on the phone ?

Is there 1 different database per developed app ?

Best regards,
JB

M. Hossein Amerkashi

unread,
Apr 2, 2014, 10:10:15 AM4/2/14
to Jean Baptiste Soubelet, AppToMarket
Yes, different database per app.

It should be stored on /data/<your_app_package_name>/databases/<database_name>


--
For Java Bridge (sdkBridger), visit http://code.google.com/p/apptomarket/
---
You received this message because you are subscribed to the Google Groups "AppToMarket" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apptomarket...@googlegroups.com.
Visit this group at http://groups.google.com/group/apptomarket.
For more options, visit https://groups.google.com/d/optout.

Jean Baptiste Soubelet

unread,
Apr 2, 2014, 10:34:12 AM4/2/14
to appto...@googlegroups.com, Jean Baptiste Soubelet
Thank you Hossein for your very quick answer.

I can't find it. Is there a specific extension ?

The app developped with AI2LiceComplete and your Sqlite advanced block is working well.
The data are kept even after a device reboot.
They must be somewhere !

regards,
JB

M. Hossein Amerkashi

unread,
Apr 2, 2014, 10:44:16 AM4/2/14
to Jean Baptiste Soubelet, AppToMarket
1> Just out of curiosity, how do you intent to use the file when you locate it?
2> Please note that offline could be unstable and you may loose ALL your projects. Please keep making backups of your project sources

Jean Baptiste Soubelet

unread,
Apr 2, 2014, 3:37:24 PM4/2/14
to appto...@googlegroups.com, Jean Baptiste Soubelet
Hi Hossein,

the goal is to be able to synchronize the content with another DB on the web. Google doc spreadsheet for instance.
The goal should also to be able to initiate the local database with historical data.
If we can copy a new file over the former one, we can backup or fill in the local database.

Thanks for your advise. (I already have building problems on WIN7 some times, I'll try Ubuntu this evening.)

regards
JBS

M. Hossein Amerkashi

unread,
Apr 2, 2014, 5:10:56 PM4/2/14
to Jean Baptiste Soubelet, AppToMarket
Having the file won't do you any good.
You have to do a select * from local db, loop through and then sync with remote db   OR visa versa

Jesus Calvillo

unread,
Apr 4, 2014, 3:05:57 PM4/4/14
to appto...@googlegroups.com
I have a database in SQlite in PC, created with the firefox extension. I've copied to the SD but it is not as accessible from AppInventor.
I do a select to the database but does not return data
I installed SQLite Helper, but not how to use it. Please could help me.

M. Hossein Amerkashi

unread,
Apr 4, 2014, 3:14:44 PM4/4/14
to Jesus Calvillo, AppToMarket
Hi, This will not be possible.
The SQLite component has a fixed SQLite database name and can not import from other databases.
What you could do is to export all your existing data as csv, have it available on web and then on the app start up, use web component to get the text and then store into your app SQLite database.

-Hossein.

Jesus Calvillo

unread,
Apr 5, 2014, 4:01:09 PM4/5/14
to appto...@googlegroups.com

Then it would export the data to a csv and then how I use the web part to store the data in a SQLite database?

M. Hossein Amerkashi

unread,
Apr 5, 2014, 4:22:12 PM4/5/14
to Jesus Calvillo, AppToMarket
You'll have to:
check to see if its first time app is installed on device (use tinydb)
if so, use web component (set web.url to your http://server/path/to/your/php/getInitData.php)
...web.Get()  -- see HERE

Then in web.GotText:
 get the string that php is returning, split it, parse it, etc. and loop and insert into your SQLite database.


IF you don't mind your file (.apk) getting large, just embed the csv in your app and if it is first time app is being installed, then do:
split it, parse it, etc. and loop and insert into your SQLite database

Reply all
Reply to author
Forward
0 new messages