Disconnected apps

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
AlphaBase
Posts: 9
Joined: Wed Aug 31, 2016 7:45 pm

Disconnected apps

Post by AlphaBase » Thu Sep 01, 2016 2:49 pm

Does LC support the concept of disconnected applications? Where the user first downloads a larger (or smaller) data set and stores it locally on the device in SqlLite, so that when the user is not connected to the server, the data is available locally.

If so, could someone point me to documentation?

Thank you

AndyP
Posts: 634
Joined: Wed Aug 27, 2008 12:57 pm
Contact:

Re: Disconnected apps

Post by AndyP » Sat Sep 03, 2016 4:21 pm

Assume this is MySQL to SQLite. You can do this by dumping the the complete Mysql structure and data and then converting the sql commands in the dump to create a new local SQLite local db.

OR

An easier approach would be to store a SQLite db in DropBox.
Your app would then just need to download the latest version of the db from DropBox into the users local DropBox folder when it starts up and upload the local SQLite file from the users DropBox account as changes are made.


There is an active thread and links to a great DropBox library here

http://forums.livecode.com/viewtopic.ph ... it=dropbox

that you might find interesting.
Andy .... LC CLASSIC ROCKS!

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10049
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Disconnected apps

Post by FourthWorld » Sat Sep 03, 2016 4:42 pm

Good link, Andy - thanks.

@AlphaBase: LC handles local file I/O quite flexibly. To find the path to folders that allow access on mobile devices see the specialFolderPath function in the Dictionary.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: Disconnected apps

Post by Mikey » Sun Sep 04, 2016 2:36 pm

Hello again, Alpha.
Yes, everything I write is written this way. You copy the initial DB with the app in the "Copy files" pane in the Standalone Application Settings, and then you connect periodically either to an online DB (e.g. a mySQL server), or use something like Dropbox to exchange data (my preferred method).

Post Reply