×
Namespaces

Variants
Actions
(Difference between revisions)

How to get full filename of the snapshot taken in JSR 234

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
m (Text replace - "Category:Multimedia" to "")
hamishwillee (Talk | contribs)
m (Hamishwillee - Bot update - Fix metadata)
Line 1: Line 1:
 
[[Category:Java ME]][[Category:Code Snippet]][[Category:How To]][[Category:Imaging]][[Category:Camera]][[Category:Files/Data]][[Category:Advanced Multimedia Supplements (JSR-234)]]
 
[[Category:Java ME]][[Category:Code Snippet]][[Category:How To]][[Category:Imaging]][[Category:Camera]][[Category:Files/Data]][[Category:Advanced Multimedia Supplements (JSR-234)]]
{{ArticleMetaData <!-- v1.2 -->
+
{{ArticleMetaData <!-- v1.3 -->
 
|sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] -->
 
|sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] -->
 
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
 
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
 
|devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') -->
 
|devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') -->
 
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
 
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
|platform= <!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later -->
 
|devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) -->
 
 
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
 
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
 
|signing= <!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer -->
 
|signing= <!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer -->
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
+
|capabilities= <!-- Required capabilities for code (e.g. ID_CAP_LOCATION, ID_CAP_NETWORKING) -->
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
+
 
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 
|translated-by= <!-- [[User:XXXX]] -->
 
|translated-by= <!-- [[User:XXXX]] -->

Revision as of 05:02, 26 July 2013

Article Metadata
Article
Created: senthilat (30 Jun 2007)
Last edited: hamishwillee (26 Jul 2013)

While taking 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 the 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.

Example:

public void playerUpdate(Player player, String event, Object eventData) {
if (event.equals(SnapshotControl.SHOOTING_STOPPED)) {
String filename = (String)eventData;
(...)
} else if (event.equals(SnapshotControl.STORAGE_ERROR)) {
String filename = (String)eventData;
(...)
}

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.

72 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×