I am writing an iPhone and Android app where I want the user to either be able to take a photo using the camera or select from the image gallery and save that photo in a database record. I have seen that it is not advised that we store the blob in the database, so I would rather store the image name or ID. I am planning on storing the nativePath of the image in the database, but is there a way to retrieve the image from the image gallery by name or other ID when the record is retrieved from the database so I can assign it to the imageView? Do I need to save the selected image to the FileSystem so I can retrieve it later? There shouldn't be more than 10 database records in the app, so it is not the end of the world if I have to do that, but I would prefer not to if I can avoid it.
- Titanium Studio, build: 126.96.36.199207271312
- Titanium Mobile SDK 2.1.1
- iOS SDK 5.0
- Android API 4.0.3
event.media variable in your code would give you the image, if you want to get the image after its been saved to the photo gallery, you have 2 options... Save the file manually yourself, to your apps documents, or download a module like this that will let you access the images in the photo gallery.
This question has been locked and cannot accept new answers.