Choose photo from disk on Android

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
Post Reply
ashishacharya
Posts: 6
Joined: May 31st, 2017, 4:53 am

Choose photo from disk on Android

Post by ashishacharya »

I have been able to create a function to take a photo and save it using a custom filename on Android. However, I would like to offer the user an option to select a photo from their disk instead of taking it. On Windows, I've written a batch file to do this. How do I achieve this on Android?
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Choose photo from disk on Android

Post by josh »

There is not an easy way to do this. If you know the directory that the photos are in you can use dirlist to list all the files in that directory and then use setvalueset to create a dynamic value set with the names/images from the photos. You can add a third array to the call to setvalueset that contains the full paths to the photo files: setvalueset(MYFIELD, codes, labels, imagePaths).
Post Reply