Example usage for android.net Uri getAuthority

List of usage examples for android.net Uri getAuthority

Introduction

In this page you can find the example usage for android.net Uri getAuthority.

Prototype

@Nullable
public abstract String getAuthority();

Source Link

Document

Gets the decoded authority part of this URI.

Usage

From source file:Main.java

private static boolean isExternalStorageDocument(Uri uri) {
    return "com.android.externalstorage.documents".equals(uri.getAuthority());
}

From source file:Main.java

private static boolean isMediaDocument(Uri uri) {
    return "com.android.providers.media.documents".equals(uri.getAuthority());
}

From source file:Main.java

public static boolean isMediaStoreUri(Uri uri) {
    return uri != null && ContentResolver.SCHEME_CONTENT.equals(uri.getScheme())
            && MediaStore.AUTHORITY.equals(uri.getAuthority());
}

From source file:Main.java

private static boolean isDownloadsDocument(Uri uri) {
    return "com.android.providers.downloads.documents".equals(uri.getAuthority());
}

From source file:com.android.messaging.datamodel.MediaScratchFileProvider.java

public static File getFileFromUri(final Uri uri) {
    Assert.equals(AUTHORITY, uri.getAuthority());
    return getFileWithExtension(uri.getPath(), getExtensionFromUri(uri));
}

From source file:Main.java

public static boolean isExternalStorageDocument(Uri uri) {
    return "com.android.externalstorage.documents".equals(uri.getAuthority());
}

From source file:Main.java

public static boolean isMediaDocument(Uri uri) {
    return "com.android.providers.media.documents".equals(uri.getAuthority());
}

From source file:Main.java

private static boolean isGooglePhotosUri(Uri uri) {
    return "com.google.android.apps.photos.content".equals(uri.getAuthority());
}

From source file:Main.java

public static boolean isDownloadsDocument(Uri uri) {
    return "com.android.providers.downloads.documents".equals(uri.getAuthority());
}

From source file:org.peterbaldwin.vlcremote.fragment.ArtFragment.java

private static boolean isJamendoImage(Uri uri) {
    return "imgjam.com".equals(uri.getAuthority()) && uri.getPathSegments().size() != 0
            && uri.getLastPathSegment().matches("1\\.\\d+\\.jpg");
}