-
- All Implemented Interfaces:
-
com.facebook.FacebookDialog
public abstract class FacebookDialogBase<CONTENT extends Object, RESULT extends Object> implements FacebookDialog<CONTENT, RESULT>
com.facebook.internal is solely for the use of other packages within the Facebook SDK for Android. Use of any of the classes in this package is unsupported, and they may be modified or removed without warning at any time.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
FacebookDialogBase.Companion
-
Field Summary
Fields Modifier and Type Field Description private Integer
requestCode
-
Method Summary
Modifier and Type Method Description final Integer
getRequestCode()
final Unit
setRequestCode(Integer requestCode)
Set the request code for the startActivityForResult call. final Unit
setCallbackManager(CallbackManager callbackManager)
Set the callback manager that will handle callbacks for this dialog. 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. 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. Boolean
canShow(CONTENT content)
Indicates whether the dialog can be shown for the content passed in. Unit
show(CONTENT content)
Shows the dialog for the content passed in. ActivityResultContract<CONTENT, CallbackManager.ActivityResultParameters>
createActivityResultContractForShowingDialog(CallbackManager callbackManager)
Creates the ActivityResultContract instance for showing the dialog with Androidx activities and fragments. -
-
Method Detail
-
getRequestCode
final Integer getRequestCode()
-
setRequestCode
final Unit setRequestCode(Integer requestCode)
Set the request code for the startActivityForResult call. The requestCode should be outside of the range of those reserved for the Facebook SDK .
- Parameters:
requestCode
- the request code to use.
-
setCallbackManager
final Unit setCallbackManager(CallbackManager callbackManager)
Set the callback manager that will handle callbacks for this dialog. It will be used if the androidx activity result APIs are available.
-
registerCallback
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
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.
-
canShow
Boolean canShow(CONTENT content)
Indicates whether the dialog can be shown for the content passed in.
- Parameters:
content
- the content to check
-
show
Unit show(CONTENT content)
Shows the dialog for the content passed in.
- Parameters:
content
- the content to show
-
createActivityResultContractForShowingDialog
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
-
-
-
-