Skip to content

Instantly share code, notes, and snippets.

@skfaisal93
skfaisal93 / RealPathUtil.java
Created October 18, 2018 00:50
Real Path Utility class for Android, works for all API, also handle NumberFormatException for API 28
import android.annotation.SuppressLint;
import android.content.ContentUris;
import android.content.Context;
import android.content.CursorLoader;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.provider.DocumentsContract;
import android.provider.MediaStore;