Skip to content

Instantly share code, notes, and snippets.

skfaisal93 /
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.os.Build;
import android.os.Environment;
import android.provider.DocumentsContract;
import android.provider.MediaStore;