-
public final class IntentHelperHelper methods for android.content.Intent.
-
-
Method Summary
Modifier and Type Method Description static UrigetUri(@NonNull() Intent intent)Retrieves the Uri from the Intent. static List<String>getMimeTypes(@NonNull() Intent intent, @NonNull() Context context)Retrieves the available mime-types from the Intent. static List<Uri>getUris(@NonNull() Intent intent)static booleanhasMimeType(@NonNull() Intent intent, @NonNull() Context context, @NonNull() String mimeType)Check whether the Intent has a specific mime-type. static booleanhasMimeTypeWithPrefix(@NonNull() Intent intent, @NonNull() Context context, @NonNull() String prefix)Check whether the Intent has a mime-type starting the provided prefix. static booleanhasMimeTypeWithPrefix(@NonNull() Uri uri, @NonNull() Context context, @NonNull() String prefix)static StringgetSourceAppName(@NonNull() Intent intent, @NonNull() Context context)Retrieve the name of the app from which the Intent was received. static booleanhasMultipleUris(@NonNull() Intent intent)-
-
Method Detail
-
getUri
@Nullable() static Uri getUri(@NonNull() Intent intent)
Retrieves the Uri from the Intent.
- Parameters:
intent- an Intent
-
getMimeTypes
@NonNull() static List<String> getMimeTypes(@NonNull() Intent intent, @NonNull() Context context)
Retrieves the available mime-types from the Intent.
- Parameters:
intent- an Intentcontext- Android context
-
hasMimeType
static boolean hasMimeType(@NonNull() Intent intent, @NonNull() Context context, @NonNull() String mimeType)
Check whether the Intent has a specific mime-type.
- Parameters:
intent- an Intentcontext- Android contextmimeType- required mime-type string
-
hasMimeTypeWithPrefix
static boolean hasMimeTypeWithPrefix(@NonNull() Intent intent, @NonNull() Context context, @NonNull() String prefix)
Check whether the Intent has a mime-type starting the provided prefix.
- Parameters:
intent- an Intentcontext- Android contextprefix- mime-type prefix
-
hasMimeTypeWithPrefix
static boolean hasMimeTypeWithPrefix(@NonNull() Uri uri, @NonNull() Context context, @NonNull() String prefix)
-
getSourceAppName
@Nullable() static String getSourceAppName(@NonNull() Intent intent, @NonNull() Context context)
Retrieve the name of the app from which the Intent was received.
- Parameters:
intent- an Intentcontext- Android context
-
hasMultipleUris
static boolean hasMultipleUris(@NonNull() Intent intent)
-
-
-
-