files and data base on Android

Klaus major-k klaus at major-k.de
Thu Jun 2 18:06:20 EDT 2016


Hi Alain,

> Am 02.06.2016 um 23:39 schrieb Alain Vezina <alain.vezina at logilangue.com>:
> 
> Thanks Ralph,
> 
> but I don’t know how I can copy a database from engine to documents : revCopyFile is not available for Android.
> Any suggestion?

…
## Create pathnames:
put specialfolderpath("resources“) & "/your_db_file.db" into tSource
put specialfolderpath("documents“) & "/your_db_file.db" into tTarget

## Now copy that file, but only if not yet present!
if there is not a file tTarget then
  put url("binfile:" & tSource) into url("binfile:2 & tTarget)
end if
...
Now access your database via: -> specialfolderpath("documents“) & "/your_db_file.db"

On mobile specialfolderpath("engine") is the same as specialfolderpath("resources“)
but get used to specialfolderpath("resources“), since this is crossplatform! :-)

> Regards 
> 
> Alain Vezina
> Le 2016-06-02 à 16:34, Ralph DiMola <rdimola at evergreeninfo.net> a écrit :
> 
>> Alain,
>> 
>> The files are in "the engine folder". "the engine folder" is read-only. The
>> database must be copied to "the documents folder" and then opened. Change
>> the extension of the .apk to .zip and open the zip file to examine the apk
>> files The "copy files" will be in the "assets" folder.
>> 
>> Ralph DiMola
>> IT Director
>> Evergreen Information Services
>> rdimola at evergreeninfo.net

Best

Klaus
--
Klaus Major
http://www.major-k.de
klaus at major-k.de





More information about the use-livecode mailing list