Example usage for android.media ExifInterface TAG_MAKER_NOTE

List of usage examples for android.media ExifInterface TAG_MAKER_NOTE

Introduction

In this page you can find the example usage for android.media ExifInterface TAG_MAKER_NOTE.

Prototype

String TAG_MAKER_NOTE

To view the source code for android.media ExifInterface TAG_MAKER_NOTE.

Click Source Link

Document

Type is String.

Usage

From source file:Main.java

public static void removeExif(String path) {
    if (!TextUtils.isEmpty(path)) {
        return;/*from w w w .  j a va2 s  . com*/
    }
    ExifInterface exifInterface;
    try {
        exifInterface = new ExifInterface(path);
    } catch (IOException ignore) {
        return;
    }
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
        exifInterface.setAttribute(ExifInterface.TAG_ARTIST, "");
        exifInterface.setAttribute(ExifInterface.TAG_RESOLUTION_UNIT, "0");
        exifInterface.setAttribute(ExifInterface.TAG_DATETIME_ORIGINAL, "");
        exifInterface.setAttribute(ExifInterface.TAG_MAKER_NOTE, "0");
    }
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        exifInterface.setAttribute(ExifInterface.TAG_DATETIME_DIGITIZED, "");
    }
    exifInterface.setAttribute(ExifInterface.TAG_MAKE, "");
    exifInterface.setAttribute(ExifInterface.TAG_MODEL, "");
    exifInterface.setAttribute(ExifInterface.TAG_ORIENTATION, "0");

    exifInterface.setAttribute(ExifInterface.TAG_DATETIME, "");
    exifInterface.setAttribute(ExifInterface.TAG_GPS_LATITUDE, "");
    exifInterface.setAttribute(ExifInterface.TAG_GPS_LONGITUDE, "");

    exifInterface.setAttribute(ExifInterface.TAG_GPS_LATITUDE, "");

}