Package 

Class GamingImageUploader

    • Constructor Detail

      • GamingImageUploader

        GamingImageUploader(Context context)
    • Method Detail

      • uploadToMediaLibrary

         void uploadToMediaLibrary(String caption, Bitmap imageBitmap, boolean shouldLaunchMediaDialog)

        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 image, can be null
        imageBitmap - a bitmap with the image that will be uploaded.
        shouldLaunchMediaDialog - if set to True will open the Media Dialog in the FB App to allowthe user to share the uploaded image.
      • uploadToMediaLibrary

         void uploadToMediaLibrary(String caption, Bitmap imageBitmap, boolean shouldLaunchMediaDialog, GraphRequest.Callback 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 image, can be null
        imageBitmap - a bitmap with the image that will be uploaded.
        shouldLaunchMediaDialog - if set to True will open the Media Dialog in the FB App to allowthe user to share the uploaded image.
        callback - a callback that will be called when the request is completed to handle successor error conditions, can be null.
      • uploadToMediaLibrary

         void uploadToMediaLibrary(String caption, File imageFile, boolean shouldLaunchMediaDialog)

        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 image, can be null
        imageFile - the file containing the image to upload
        shouldLaunchMediaDialog - if set to True will open the Media Dialog in the FB App to allowthe user to share the uploaded image.
      • uploadToMediaLibrary

         void uploadToMediaLibrary(String caption, File imageFile, boolean shouldLaunchMediaDialog, GraphRequest.Callback 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 image, can be null
        imageFile - the file containing the image to upload
        shouldLaunchMediaDialog - if set to True will open the Media Dialog in the FB App to allowthe user to share the uploaded image.
        callback - a callback that will be called when the request is completed to handle successor error conditions, can be null.
      • uploadToMediaLibrary

         void uploadToMediaLibrary(String caption, Uri imageUri, boolean shouldLaunchMediaDialog)

        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 image, can be null
        imageUri - the file:// or content:// Uri to the image on device
        shouldLaunchMediaDialog - if set to True will open the Media Dialog in the FB App to allowthe user to share the uploaded image.
      • uploadToMediaLibrary

         void uploadToMediaLibrary(String caption, Uri imageUri, boolean shouldLaunchMediaDialog, GraphRequest.Callback 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 image, can be null
        imageUri - the file:// or content:// Uri to the image on device
        shouldLaunchMediaDialog - if set to True will open the Media Dialog in the FB App to allowthe user to share the uploaded image.
        callback - a callback that will be called when the request is completed to handle successor error conditions, can be null.