Hello Tasker-Community,
since I've read the Tasker's 4.6 changelog, I was eager to use the new
Java Function in my projects.
Recently I needed an option to access the EXIF tags of jpg images, first try with JS was to complicated due to
file access and same-origin-issues.
also very interesting for other users, so I will publish a solution when working/ready upon request.
When I understood everything right, the actions below should text-flash the used
ISO value (AD):
Java Exif Img
A1: Variable Set [ Name:%imgpath To:/sdcard/exifTest.jpg ]
A2: Java Function [ Return:(ExifInterface) ei Class Or Object:ExifInterface Function:new {ExifInterface} (String) Param:%imgpath
A3: Java Function [ Return:%exifvalue Class Or Object:ei Function:getAttribute {String} (String) Param:TAG_ISO]
A4: Flash [ Text:%exifvalue Long:On ]
Comments:
A1: define the targeted image as variable, I want to loop trough a directory later when it's working ;-)
A2: load the class "ExifInterface" and pass the absolute path as (String) and define all that as "ei" (=object??!)
A3: run "getAttribute" on "ei" with "TAG_ISO" as (String)-parameter and return the result as Tasker-Var: %exifvalue ({String}-variable)
A4: output of the result
But so far it's not working - I appreciate any help. Since I' always keen to lean new stuff, I'm also
happy if someone can point me towards the stumble.
PS.: Due to the fact that I'm not so familiar with Java programming - another question for the Java||Tasker experts:
Is there a simple option to return a selection or all exif-tags, best as JSON either direct or saved to storage?
The later use of the EXIF-data would be in a WebView with JS for readout and processing.