//mobile and embedded /
// second entry is GPS Latitude - 2 bytes
bos.write(0x02);
bos.write(0x00);
LISTING 11 LISTING 12
COMMUNITY
// data format (rational) - 2 bytes
bos.write(0x05);
bos.write(0x00);
// number of components ( 2 - degrees and minutes) - 4 bytes
bos.write(0x02);
bos.write(0x00);
bos.write(0x00);
bos.write(0x00);
YOUR
LOCAL JAVA
USER GROUP
NEEDS YOU
JAVA IN ACTION
// offset to data value ( 64) - 4 bytes
bos.write(0x40);
bos.write(0x00);
bos.write(0x00);
bos.write(0x00);
Find your JUG here
ABOUT US
Download all listings in this issue as text
tion to have their own entry (that is why
we specified earlier that the number of
components for the GPS latitude is 2).
We could become even more fine-grained and show seconds as well. In
that case, we would need to mark the
number of components as 3.
The GPS longitude uses the same format (omitted here for space purposes).
only briefly on the Location API and
taking snapshots. We then discussed
modifying the image data to hold EXIF
metadata information, covered the basics
of EXIF, and worked on the code for an
actual application. </article>
Conclusion
This article combined three separate
technologies to modify an image to hold
GPS metadata information. We touched
LEARN MORE
;; “Getting Started with Touchscreen UIs in
Java Platform, Micro Edition”
;; “Working with the XML Parser API —
JSR 172”
;; “Working with the Mobile Sensor API”
blog
58
ORACLE.COM/JAVAMAGAZINE /////////////////////////////////////////////// MAY/JUNE 2012