title: How to read JPG EXIF data in Android app written with Delphi?
body: <p>I need to take a picture with Android app (either from Camera or from Gallery) and check its EXIF date-time (and a couple other properties). I have successfully implemented recieving of the JPG image and loading it into TStream and GUI Image components. But I'm having trouble extracting the EXIF data.</p>
  
  <p>I've tried the following code (and it's variants available on the internet):</p>
  
  <pre><code>procedure ReadEXIF(aPath: string);
  var
    LEXIF: JExifInterface;
    LDateTaken: string;
  begin
    // Path looks like:
    // /data/data/com.embarcadero.SimpleLogin/cache/IMG_20190305_085250104151537.jpg
    LEXIF := TJExifInterface.JavaClass.init(StringToJString(aPath));
    LDateTaken := JStringToString(LEXIF.getAttribute(TJExifInterface.JavaClass.TAG_DATETIME));
    Log.d(LDateTaken);
  end;
  </code></pre>
  
  <p>but it returns "Raw image not detected" error.</p>
  
  <p>How do I read the EXIF data?</p>
  
  <p>P.S. Tried the CCR-EXIF lib, but it won't compile for FMX (too many Ansi references throughout its code).<br>
  P.P.S. I've verified that received image has EXIF data (saved it from stream to other location and checked)</p>