-
public class GamingVideoUploader
-
-
Constructor Summary
Constructors Constructor Description GamingVideoUploader(Context context)Utility class to upload Videos to a Player's Gaming Media Library.
-
Method Summary
Modifier and Type Method Description voiduploadToMediaLibrary(String caption, Uri videoUri)Uploads a video to a player's Gaming Media Library. voiduploadToMediaLibrary(String caption, Uri videoUri, GraphRequest.OnProgressCallback callback)Uploads a video to a player's Gaming Media Library. voiduploadToMediaLibrary(String caption, Uri videoUri, boolean shouldLaunchMediaDialog, GraphRequest.OnProgressCallback callback)Uploads an image to a player's Gaming Media Library. -
-
Constructor Detail
-
GamingVideoUploader
GamingVideoUploader(Context context)
Utility class to upload Videos to a Player's Gaming Media Library.- Parameters:
context- Android Context for the activity launching initiating an upload.
-
-
Method Detail
-
uploadToMediaLibrary
void uploadToMediaLibrary(String caption, Uri videoUri)
Uploads a video to a player's Gaming Media Library.
After uploading the player will receive a notification that a new item on their medialibrary is ready to share.
Note: After the upload is complete the video still needs to be encoded by Facebook and won'tbe immediately available to be shared.
- Parameters:
caption- the user generated caption for the video, can be nullvideoUri- the file:// or content:// Uri to the video on device
-
uploadToMediaLibrary
void uploadToMediaLibrary(String caption, Uri videoUri, GraphRequest.OnProgressCallback callback)
Uploads a video to a player's Gaming Media Library.
After uploading the player will receive a notification that a new item on their medialibrary is ready to share.
Note: After the upload is complete the video still needs to be encoded by Facebook and won'tbe immediately available to be shared.
- Parameters:
caption- the user generated caption for the video, can be nullvideoUri- the file:// or content:// Uri to the video on devicecallback- an optional OnProgressCallback to track the upload process.
-
uploadToMediaLibrary
void uploadToMediaLibrary(String caption, Uri videoUri, boolean shouldLaunchMediaDialog, GraphRequest.OnProgressCallback callback)
Uploads an image to a player's Gaming Media Library.
After uploading the player will receive a notification that a new item on their medialibrary is ready to share. If shouldLaunchMediaDialog is set to true this will also trigger theMedia Dialog to open and allow immediate sharing.
- Parameters:
caption- the user generated caption for the video, can be nullvideoUri- the file:// or content:// Uri to the video on deviceshouldLaunchMediaDialog- if set to True will open the Media Dialog in the FB App to allowthe user to share the uploaded video.callback- an optional OnProgressCallback to track the upload process.
-
-
-
-