App Inventor Extensions


Image Metadata Extension

See the App Inventor Extensions document about how to use an App Inventor Extension.

For questions about this extension or bug reports please start a new thread in the App Inventor Extensions forum. Thank you.

For feature requests please contact me by email. To be a sponsor of a new method already is possible starting from only 10 USD! With your contribution you will help the complete App Inventor community. Thank you.

Jan 9th, 2016: Version 1 of the Metadata Extension released for App Inventor version ai2extensions6 and Companion version 235.cdk2.

Aug 11th, 2016: Version 1a: avoid DX execution failed error: build each extension separately

Description

This extension reads the metadata of an image file. The extension uses the Metadata Extractor library from Drew Noakes. Thank you Drew! For supported file formats see here.
Required permissions: android.permission.READ_EXTERNAL_STORAGE, android.permission.WRITE_EXTERNAL_STORAGE

Methods


Get metadata from image file
Prefix the imageFileName with / (i.e. relative path) for an image file on the SD card. For instance /myImage.jpg will get the metadata of file mnt/sdcard/myImage.jpg. To get the metadata of an image file uploaded as asset packaged with an application (also works for the Companion) start the imageFileName with // (two slashes). If imageFileName starts with file:/// you can specify a complete path to the file.

Example Use


The metadata result is provided as nested list. The metadata is structured into different directories (see the highlighted directory values in the example png file). Inside each directory there are different tags and their values. You can get the value of a specific tag using the lookup in pairs block (see also below). In case you are not familiar with working with lists, this is a good opportunity to learn more about that...

Example App: Metadata Test





Example Image by Tom Hall, found on Flickr. Thank you Tom!

Example Image by jch2103 found in the photools.com forum to demonstrate geolocation data. Thank you jch2103!

Do you need help with your App Inventor project?

I can help you: for one hour I charge 25 USD.
Please contact me at info [at] puravidaapps [dot] com for details!
For questions about App Inventor, please use the App Inventor forum. Thank you.

Terms and Conditions

Download


If you find this example helpful and you are using it in one of your projects,
be nice and donate a small amount!

Donation amount:

or donate some mBTC to Bitcoin Address:
1Jd8kXLHu2Vkuhi15TWHiQm4uE9AGPYxi8
Bitcoin

Thank you! Taifun
 

Download TaifunMetadata extension (aix file)
Download Metadata Test (aia file)
Back to top of page ...

Creative Commons License
This work by Pura Vida Apps is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
with attribution (name=Pura Vida Apps and link to the source site) required.


Home | Snippets | Tutorials | Extensions | News | Forums | Links | Search | Contact