Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Regular Contributor
Posts: 68
Registered: ‎03-13-2012
My Device: Playbook
My Carrier: Rodgers

EXIF writting?

Hi was not able to find examples on geotagging photos. I know that the default bb10 camera has access to gps.


I that I would have to write the EXIF data using the built in library?


For instance 


The OnPhotoSaved function.


Get GeoLocation Data.

I would write the photo jpg with this information. // built using EXIF library.
Save the photo to the camera/shared


//GeoTagging complete?



Or is there a built in function to do this. I have searched the documentation and found nothing.

Posts: 1,008
Registered: ‎12-12-2010
My Device: Passport (Red Limited Edition)
My Carrier: Mobile Vikings

Re: EXIF writting?

Do you try toying around with the libexif library from this page?

BlackBerry Certified Builder for Native Application Development -- Proud member of the Belgian BlackBerry Developer group
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Regular Contributor
Posts: 68
Registered: ‎03-13-2012
My Device: Playbook
My Carrier: Rodgers

Re: EXIF writting?

I have but I noticed that the bb10 camera by default has the geotagging, I was wondering if that was built into the camera api?


Or do I have to write this into the image file using this




I would have hoped for better exif support on the camera, because now I have to figure out what needs to be written,


GPSLatitude      GPSLongitude      GPSAltitude          GPSDateStamp
GPSLatitudeRef   GPSLongitudeRef   GPSAltitudeRef       GPSTimeStamp
GPSTrack         GPSSpeed          GPSImgDirection      GPSPitch        
GPSTrackRef      GPSSpeedRef       GPSImgDirectionRef   GPSRoll I would assome thats all i need to write? how would I get access to these things via the location services ?

Another question I have is can I write my own data into the file perhaps add user comments and or tags? ?

Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: EXIF writting?

The camera service doesn't geotag the image for you, but you can provide it the data in the C API with camera_set_geolocation.


If you are using the Cascades API, yes, you would need to tag it with libexif.

Paul Bernhardt
Application Development Consultant

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker