Choose photo from disk on Android

Discussions about creating CAPI applications to run on Android devices
Posts: 6
Joined: May 31st, 2017, 4:53 am

Choose photo from disk on Android

Postby ashishacharya » January 5th, 2018, 12:11 am

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?

Posts: 1687
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Choose photo from disk on Android

Postby josh » January 5th, 2018, 11:09 am

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).

Return to “Android”