-
public interface FacebookDialog<CONTENT extends Object, RESULT extends Object>
Represents dialogs provided by Facebook
-
-
Method Summary
Modifier and Type Method Description abstract Boolean
canShow(CONTENT content)
Indicates whether the dialog can be shown for the content passed in. abstract Unit
show(CONTENT content)
Shows the dialog for the content passed in. abstract Unit
registerCallback(CallbackManager callbackManager, FacebookCallback<RESULT> callback)
Allows the registration of a callback that will be executed once the dialog is closed, with success, cancel or error details. abstract Unit
registerCallback(CallbackManager callbackManager, FacebookCallback<RESULT> callback, Integer requestCode)
Allows the registration of a callback that will be executed once the dialog is closed, with success, cancel or error details. abstract ActivityResultContract<CONTENT, CallbackManager.ActivityResultParameters>
createActivityResultContractForShowingDialog(CallbackManager callbackManager)
Creates the ActivityResultContract instance for showing the dialog with Androidx activities and fragments. -
-
Method Detail
-
canShow
abstract Boolean canShow(CONTENT content)
Indicates whether the dialog can be shown for the content passed in.
- Parameters:
content
- the content to check
-
show
abstract Unit show(CONTENT content)
Shows the dialog for the content passed in.
- Parameters:
content
- the content to show
-
registerCallback
abstract Unit registerCallback(CallbackManager callbackManager, FacebookCallback<RESULT> callback)
Allows the registration of a callback that will be executed once the dialog is closed, with success, cancel or error details. This should be called in the or methods.
- Parameters:
callbackManager
- CallbackManager instance that will handle the onActivityResultcallback
- Callback to be called upon dialog completion
-
registerCallback
abstract Unit registerCallback(CallbackManager callbackManager, FacebookCallback<RESULT> callback, Integer requestCode)
Allows the registration of a callback that will be executed once the dialog is closed, with success, cancel or error details. This should be called in the or methods.
- Parameters:
callbackManager
- CallbackManager instance that will handle the Activity Resultcallback
- Callback to be called upon dialog completionrequestCode
- The request code to use, this should be outside of the range of those reserved for the Facebook SDK com.facebook.FacebookSdk.isFacebookRequestCode.
-
createActivityResultContractForShowingDialog
abstract ActivityResultContract<CONTENT, CallbackManager.ActivityResultParameters> createActivityResultContractForShowingDialog(CallbackManager callbackManager)
Creates the ActivityResultContract instance for showing the dialog with Androidx activities and fragments.
- Parameters:
callbackManager
- CallbackManager instance that will handle the onActivityResult
-
-
-
-