DataBases and how to store images on mobile devices(?)

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
DevBoyLars
Posts: 216
Joined: Wed Feb 27, 2013 9:04 pm

DataBases and how to store images on mobile devices(?)

Post by DevBoyLars » Sun Mar 31, 2013 3:31 pm

Hi there,
I want to build an App, which takes pictures on mobile devices and save them (not in cam-roll).

Would it be the best way to create a (SQL?) database and save the filenames (with category) inside and save the images in folders or is it possible/better to store the image itself into a database?

Thank you :)

DevBoyLars
Posts: 216
Joined: Wed Feb 27, 2013 9:04 pm

Re: DataBases and how to store images on mobile devices(?)

Post by DevBoyLars » Sun Apr 14, 2013 1:09 pm

No one can help?

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: DataBases and how to store images on mobile devices(?)

Post by jmburnod » Sun Apr 14, 2013 2:31 pm

Hi DevboyLars,
You can store the images in a subfolder of the documents folder of the sandbox of your app
Best regards
Jean-Marc
https://alternatic.ch

DevBoyLars
Posts: 216
Joined: Wed Feb 27, 2013 9:04 pm

Re: DataBases and how to store images on mobile devices(?)

Post by DevBoyLars » Sun Apr 14, 2013 3:23 pm

Thank you :)

And would it be better to store the filenames in a SQL-DB or use XML?

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: DataBases and how to store images on mobile devices(?)

Post by jmburnod » Sun Apr 14, 2013 3:31 pm

And would it be better to store the filenames in a SQL-DB or use XML?
Sorry I don't use them.
I use the directory of the images folder to build an index of files which is stored in a simple .txt file
https://alternatic.ch

DevBoyLars
Posts: 216
Joined: Wed Feb 27, 2013 9:04 pm

Re: DataBases and how to store images on mobile devices(?)

Post by DevBoyLars » Sun Apr 14, 2013 3:36 pm

Could you post an example-code, please?

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: DataBases and how to store images on mobile devices(?)

Post by jmburnod » Sun Apr 14, 2013 4:14 pm

I use the files in this script but you can use detailed files to get more information about each file

Code: Select all

on mouseUp
   answer folder "Open:"
   if it = empty then exit mouseUp
   put the defaultfolder into tODF
   put it into sCurFolPict
   set the defaultfolder to it
   put the files into tFiles
   filter tFiles without ".*"
   put sCurFolPict & "/" & "myIndex" into tUrl
   put tFiles into url("file:" & tUrl)
   set the defaultfolder to tODF
end mouseUp
https://alternatic.ch

Post Reply