Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

Get Image file path

String filePath = getPath(imageUri);

public String getPath(Uri uri) {
        String[] projection = {MediaStore.MediaColumns.DATA};
        Cursor cursor = managedQuery(uri, projection, null, null, null);
        int column_index = cursor
                .getColumnIndexOrThrow(MediaStore.MediaColumns.DATA);
        cursor.moveToFirst();
        String imagePath = cursor.getString(column_index);

        return cursor.getString(column_index);
    }
Comment

PREVIOUS NEXT
Code Example
Java :: java printwriter create file 
Java :: java switch statement 
Java :: java to c# converter 
Java :: Java Create a Scanner Object in Java 
Java :: java creating an object 
Java :: transformer une chaine de caractère en nombre java 
Java :: constructor of class that extends another class 
Java :: list remove duplicates java 
Java :: set up a tree in java 
Java :: Example of a Do..While Loop 
Java :: convert java code to kotlin online converter 
Java :: the java_home environment variable is not defined correctly on mac 
Java :: Declaring a Java Method 
Java :: java constructor example 
Java :: method 
Java :: dates in java 8 
Java :: java interview questions for freshers 
Java :: java string class 
Java :: android videoview not smooth for mp4 
Java :: jdsu software download 
Java :: random class in java 
Java :: print 1 to 10 using for loop in java 
Java :: print all prime no java 
Java :: Note: flutterpluginspathproviderPathProviderPlugin.java uses unchecked or unsafe operations. 
Java :: expression régulière seulement un espace java 
Java :: java Least prime factor of numbers till n 
Java :: how to send int value from one actvi to another in android 
Java :: force_dark_auto android webview 
Java :: difference between compile and execute in java 
Java :: how-to-use-volley-string-request-in-android 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =