Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
How to get full filename of the snapshot taken in JSR 234
This article demonstrates how to get the full filename of a snapshot taken with JSR 234.
While taking camera snapshot using JSR-234, filename of the image saved to the file system of the phone is generated by the JSR itself in a sequence. The MIDlet does not have any control on that. However there are cases where the exact filename is needed to access the file and do subsequent processing.
To get filename you need to implement the player listener interface. There are two events that will be received when save is done: SHOOTING_STOPPED (when the burst shooting stops and the files have been stored into the file system) or STORAGE_ERROR (when there has been an error while storing the files into the file system). In both cases eventData parameter will be a String with filename.
Please remember that any "time consuming" operations (like image processing) should be run in separate thread (leave playerUpdate as fast as possible).
Detailed information can be found in SnapshotControl class documentation.