Package com.cheetahdigital.uikit.helper
Class AttachmentPicker
- java.lang.Object
-
- com.cheetahdigital.uikit.helper.AttachmentPicker
-
public class AttachmentPicker extends java.lang.ObjectThis is used as a helper class in getting Intents for Newsfeed Attachment (for Newsfeed Post feature) It basically returns the Intent that is necessary to pick or capture images or videos.
-
-
Constructor Summary
Constructors Constructor Description AttachmentPicker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheckPermission(android.content.Context context, int request)Helper method to check if permission is required, if required, this will show a dialog that starts the permission requeststatic booleanclearUriString(android.content.Context context)Clears uri string values from shared preferences.static android.content.IntentgetImageIntents(android.content.Context context)Get the Intent to be used for picking and capturing images.static android.content.IntentgetImageIntents(android.content.Context context, android.net.Uri uri)static java.lang.StringgetUriString(android.content.Context context)Fetches the uri string.static android.content.IntentgetVideoIntent(android.content.Context context)Get the Intent to be used for picking a video and capturing video.
-
-
-
Method Detail
-
getVideoIntent
public static android.content.Intent getVideoIntent(android.content.Context context)
Get the Intent to be used for picking a video and capturing video. For Video Capture, this method create a temporary video file where the captured video will be saved.- Parameters:
context- the application context- Returns:
- Intent to be used for picking a video and capturing video.
-
getImageIntents
public static android.content.Intent getImageIntents(android.content.Context context)
Get the Intent to be used for picking and capturing images.- Parameters:
context- the application context- Returns:
- Intent to be used for picking and capturing images
-
getImageIntents
public static android.content.Intent getImageIntents(android.content.Context context, android.net.Uri uri)
-
getUriString
public static java.lang.String getUriString(android.content.Context context)
Fetches the uri string.- Parameters:
context- application context- Returns:
- uri string
-
clearUriString
public static boolean clearUriString(android.content.Context context)
Clears uri string values from shared preferences.- Parameters:
context- application context- Returns:
- true if transaction is successful, else false
-
checkPermission
public static boolean checkPermission(android.content.Context context, int request)Helper method to check if permission is required, if required, this will show a dialog that starts the permission request- Parameters:
context- application contextrequest- ID of the request- Returns:
- True if permission is required, otherwise false
-
-