Hey guys.. Ok, here it is..
It's just the first version, with only the basic geotagging information.
It consists in three tasks.
The EXIFdecToDMS is a task/function that receives as argument lat or lon in decimal format (12.34567) and returns the DMS expected by EXIF specs (12/1,20/1,444/10).
It is used inside the EXIFsaveGeoTag task.
The EXIFsaveGeoTag is a task/function that receives a file path as argument. It will read the %LOC variable, split, check N-S/E-W, pass lat/lon to EXIFdecToDMS and use ExifInterface to write GPSLatitude, GPSLatitudeRef, GPSLongitude, GPSLongitudeRef to the file received as argument.
The GeotaggedPicture task will define the %mnt var, take a photo and pass %mnt/%FOTO to EXIFsaveGeoTag.
In this example I'm using it to take a picture and geotag, but since EXIFsaveGeoTag receive a file path as argument, you can mess with it as you want.
If you use this tasks and the coordinates aren't correct, start checking inside EXIFdecToDMS the return value. Maybe you'll need to play with the fraction of seconds (%sss/10, %sss/100, %sss/1000, etc).
I tested it using a Moto G and /10 is the correct value for my setup.
Hope it can be useful for someone.
And thanks again for the kind advice gave by David Wang.
--
Best regards