Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.annotation.SuppressLint;

import android.net.Uri;
import android.provider.DocumentsContract;

public class Main {
    @SuppressLint("NewApi")
    public static String getRealPathFromUriApi21(Uri uri) {
        return DocumentsContract.getDocumentId(uri);
    }
}