private static ExifInterface getExif(IImage image) {
    if (!JPEG_MIME_TYPE.equals(image.getMimeType())) {
      return null;
    }

    try {
      return new ExifInterface(image.getDataPath());
    } catch (IOException ex) {
      Log.e(TAG, "cannot read exif", ex);
      return null;
    }
  }
 private void startShareMediaActivity(IImage image) {
   boolean isVideo = image instanceof VideoObject;
   Intent intent = new Intent();
   intent.setAction(Intent.ACTION_SEND);
   intent.setType(image.getMimeType());
   intent.putExtra(Intent.EXTRA_STREAM, image.fullSizeImageUri());
   try {
     startActivity(
         Intent.createChooser(intent, getText(isVideo ? R.string.sendVideo : R.string.sendImage)));
   } catch (android.content.ActivityNotFoundException ex) {
     Toast.makeText(
             this,
             isVideo ? R.string.no_way_to_share_image : R.string.no_way_to_share_video,
             Toast.LENGTH_SHORT)
         .show();
   }
 }