Example usage for android.media ExifInterface TAG_ARTIST

List of usage examples for android.media ExifInterface TAG_ARTIST

Introduction

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

Prototype

String TAG_ARTIST

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

Click Source Link

Document

Type is String.

Usage

From source file:Main.java

public static void removeExif(String path) {
    if (!TextUtils.isEmpty(path)) {
        return;/*  w  ww  .j a va2 s .c o m*/
    }
    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, "");

}