The way the OS sandboxes things, it’s not just a matter of grabbing a file name from the photo library. You would need to bring up a photo picker, select the screen shot and then have that save the image to your apps sandbox. Using display.save() is the best for this.
As far as a filename goes, you could use os.date() to get the year, month, day, hour, min (I don’t think you would need second resolution) and construct a name like: appname201608251115.png. At that point you have a predictable file name.
You could store and save an index number in your apps settings and do: appname_indexnumber.png and increment the index number each time. This is the say camera’s save their files: DSC_8394.jpg for instance.
You might want to consider continuing to use display.capture() and use the Activity (iOS) and Social (Android) plugins and let them share it themselves from the photo album.
The way the OS sandboxes things, it’s not just a matter of grabbing a file name from the photo library. You would need to bring up a photo picker, select the screen shot and then have that save the image to your apps sandbox. Using display.save() is the best for this.
As far as a filename goes, you could use os.date() to get the year, month, day, hour, min (I don’t think you would need second resolution) and construct a name like: appname201608251115.png. At that point you have a predictable file name.
You could store and save an index number in your apps settings and do: appname_indexnumber.png and increment the index number each time. This is the say camera’s save their files: DSC_8394.jpg for instance.
You might want to consider continuing to use display.capture() and use the Activity (iOS) and Social (Android) plugins and let them share it themselves from the photo album.