Android to get the extension of file using Uri November 9, 2021 by Codingtube team To get the extension of file using Uri or mimeType use this function in java private String extension(Uri uri){ String mimeType = getContentResolver().getType(uri); return mimeType; }