Android SDK Version
- AccessToken
- AccessToken.AccessTokenCreationCallback
- AccessToken.AccessTokenRefreshCallback
- AccessTokenManager
- AccessTokenSource
- AccessTokenTracker
- AddressFilterManager
- All
- AppEvent
- AppEventsConstants
- AppEventsLogger
- AppEventsLogger.FlushBehavior
- AppEventsLogger.ProductAvailability
- AppEventsLogger.ProductCondition
- AppEventsManager
- AppGroupCreationContent
- AppGroupCreationContent.AppGroupPrivacy
- AppGroupCreationContent.Builder
- AppInviteContent
- AppInviteContent.Builder
- AppInviteContent.Builder.Destination
- AppInviteDialog
- AppInviteDialog.Result
- AppLinkData
- AppLinkData.CompletionHandler
- AppLinks
- CallbackManager
- CallbackManager.Factory
- CameraEffectArguments
- CameraEffectArguments.Builder
- CameraEffectTextures
- CameraEffectTextures.Builder
- CodelessLoggingEventListener
- CodelessLoggingEventListener.AutoLoggingOnClickListener
- CodelessLoggingEventListener.AutoLoggingOnItemClickListener
- CodelessManager
- Common
- Core
- CreateAppGroupDialog
- CreateAppGroupDialog.Result
- CurrentAccessTokenExpirationBroadcastReceiver
- CurrentPlaceFeedbackRequestParams
- CurrentPlaceFeedbackRequestParams.Builder
- CurrentPlaceRequestParams
- CurrentPlaceRequestParams.Builder
- CurrentPlaceRequestParams.ConfidenceLevel
- CurrentPlaceRequestParams.ScanMode
- CustomTabActivity
- CustomTabLoginMethodHandler
- CustomTabMainActivity
- DefaultAudience
- DeviceAuthDialog
- DeviceLoginButton
- DeviceLoginManager
- DeviceShareButton
- DeviceShareDialog
- DeviceShareDialog.Result
- EventDeactivationManager
- FacebookActivity
- FacebookAppLinkResolver
- FacebookAuthorizationException
- FacebookBroadcastReceiver
- FacebookButtonBase
- FacebookCallback
- FacebookContentProvider
- FacebookDialog
- FacebookDialogException
- FacebookException
- FacebookGraphResponseException
- FacebookOperationCanceledException
- FacebookRequestError
- FacebookRequestError.Category
- FacebookSdk
- FacebookSdk.InitializeCallback
- FacebookSdkNotInitializedException
- FacebookServiceException
- FlushResult
- GameRequestContent
- GameRequestContent.ActionType
- GameRequestContent.Builder
- GameRequestContent.Filters
- GameRequestDialog
- GameRequestDialog.Result
- GraphRequest
- GraphRequest.Callback
- GraphRequest.GraphJSONArrayCallback
- GraphRequest.GraphJSONObjectCallback
- GraphRequest.OnProgressCallback
- GraphRequest.ParcelableResourceWithMimeType
- GraphRequestAsyncTask
- GraphRequestBatch
- GraphRequestBatch.Callback
- GraphRequestBatch.OnProgressCallback
- GraphResponse
- GraphResponse.PagingDirection
- HttpMethod
- InternalAppEventsLogger
- JoinAppGroupDialog
- JoinAppGroupDialog.Result
- LikeView
- LikeView.AuxiliaryViewPosition
- LikeView.HorizontalAlignment
- LikeView.ObjectType
- LikeView.OnErrorListener
- LikeView.Style
- LoggingBehavior
- Login
- LoginBehavior
- LoginButton
- LoginButton.ToolTipMode
- LoginFragment
- LoginManager
- LoginResult
- LoginStatusCallback
- MessageDialog
- Messenger
- MessengerThreadParams
- MessengerThreadParams.Origin
- MessengerUtils
- MetadataIndexer
- Model
- ModelManager
- PlaceFields
- PlaceInfoRequestParams
- PlaceInfoRequestParams.Builder
- PlaceManager
- PlaceManager.LocationError
- PlaceManager.OnRequestReadyCallback
- Places
- PlaceSearchRequestParams
- PlaceSearchRequestParams.Builder
- Profile
- ProfileManager
- ProfilePictureView
- ProfilePictureView.OnErrorListener
- ProfileTracker
- RCTCodelessLoggingEventListener
- RCTCodelessLoggingEventListener.AutoLoggingOnTouchListener
- RestrictiveDataManager
- SendButton
- Share
- ShareApi
- ShareBuilder
- ShareButton
- ShareButtonBase
- ShareCameraEffectContent
- ShareCameraEffectContent.Builder
- ShareContent
- ShareContent.Builder
- ShareDialog
- ShareDialog.Mode
- ShareGraphRequest
- ShareHashtag
- ShareHashtag.Builder
- ShareLinkContent
- ShareLinkContent.Builder
- ShareMedia
- ShareMedia.Builder
- ShareMedia.Type
- ShareMediaContent
- ShareMediaContent.Builder
- ShareMessengerActionButton
- ShareMessengerActionButton.Builder
- ShareMessengerGenericTemplateContent
- ShareMessengerGenericTemplateContent.Builder
- ShareMessengerGenericTemplateContent.ImageAspectRatio
- ShareMessengerGenericTemplateElement
- ShareMessengerGenericTemplateElement.Builder
- ShareMessengerMediaTemplateContent
- ShareMessengerMediaTemplateContent.Builder
- ShareMessengerMediaTemplateContent.MediaType
- ShareMessengerOpenGraphMusicTemplateContent
- ShareMessengerOpenGraphMusicTemplateContent.Builder
- ShareMessengerURLActionButton
- ShareMessengerURLActionButton.Builder
- ShareMessengerURLActionButton.WebviewHeightRatio
- ShareModel
- ShareModelBuilder
- ShareOpenGraphAction
- ShareOpenGraphAction.Builder
- ShareOpenGraphContent
- ShareOpenGraphContent.Builder
- ShareOpenGraphObject
- ShareOpenGraphObject.Builder
- ShareOpenGraphValueContainer
- ShareOpenGraphValueContainer.Builder
- SharePhoto
- SharePhoto.Builder
- SharePhotoContent
- SharePhotoContent.Builder
- Sharer
- Sharer.Result
- ShareStoryContent
- ShareStoryContent.Builder
- ShareToMessengerParams
- ShareToMessengerParamsBuilder
- ShareVideo
- ShareVideo.Builder
- ShareVideoContent
- ShareVideoContent.Builder
- SuggestedEventsManager
- ToolTipPopup
- ToolTipPopup.Style
- UserDataStore
- Utils
- ViewIndexer
- ViewOnClickListener
- WebDialog
- java.lang.Object
- com.facebook.FacebookSdk
public final class FacebookSdk
extends java.lang.Object
This class allows some customization of Facebook SDK behavior.
Nested Class Summary
Modifier and Type | Class and Description |
---|---|
static interface | FacebookSdk.InitializeCallback Callback passed to the sdkInitialize function. |
Field Summary
Modifier and Type | Field and Description |
---|---|
static java.lang.String | ADVERTISER_ID_COLLECTION_ENABLED_PROPERTY The key for the advertiserID collection in the Android manifest. |
static java.lang.String | APP_EVENT_PREFERENCES The key for AppEvent perfernece setting. |
static java.lang.String | APPLICATION_ID_PROPERTY The key for the application ID in the Android manifest. |
static java.lang.String | APPLICATION_NAME_PROPERTY The key for the application name in the Android manifest. |
static java.lang.String | AUTO_INIT_ENABLED_PROPERTY The key for the auto init SDK in the Android manifest. |
static java.lang.String | AUTO_LOG_APP_EVENTS_ENABLED_PROPERTY The key for the auto logging app events in the Android manifest. |
static java.lang.String | CALLBACK_OFFSET_PROPERTY The key for the callback off set in the Android manifest. |
static java.lang.String | CLIENT_TOKEN_PROPERTY The key for the client token in the Android manifest. |
static java.lang.String | CODELESS_DEBUG_LOG_ENABLED_PROPERTY The key for the auto log codeless in the Android manifest. |
static java.lang.String | WEB_DIALOG_THEME The key for the web dialog theme in the Android manifest. |
Method Summary
Modifier and Type | Method and Description |
---|---|
static void | addLoggingBehavior(LoggingBehavior behavior) Certain logging behaviors are available for debugging beyond those that should be enabled in production. |
static void | clearLoggingBehaviors() Certain logging behaviors are available for debugging beyond those that should be enabled in production. |
static void | fullyInitialize() Mark Facebook SDK fully intialized to make it works as expected. |
static boolean | getAdvertiserIDCollectionEnabled() |
static Context | getApplicationContext() The getter for the context of the current application. |
static java.lang.String | getApplicationId() Gets the Facebook application ID for the current app. |
static java.lang.String | getApplicationName() Gets the Facebook application name of the current app. |
static java.lang.String | getApplicationSignature(Context context) Internal call please don't use directly. |
static boolean | getAutoInitEnabled() |
static boolean | getAutoLogAppEventsEnabled() Gets the flag used by AppEventsLogger |
static java.io.File | getCacheDir() Gets the cache directory to use for caching responses, etc. |
static int | getCallbackRequestCodeOffset() Getter for the callback request code offset. |
static java.lang.String | getClientToken() Gets the client token for the current app. |
static boolean | getCodelessDebugLogEnabled() |
static boolean | getCodelessSetupEnabled() |
static java.util.concurrent.Executor | getExecutor() Returns the Executor used by the SDK for non-AsyncTask background work. |
static java.lang.String | getFacebookDomain() Gets the base Facebook domain to use when making Web requests; in production code this will normally be "facebook.com". |
static java.lang.String | getGraphApiVersion() Returns the Graph API version to use when making Graph requests. |
static boolean | getLimitEventAndDataUsage(Context context) Returns whether data such as those generated through AppEventsLogger and sent to Facebook should be restricted from being used for purposes other than analytics and conversions, such as targeting ads to this user. |
static java.util.Set<LoggingBehavior> | getLoggingBehaviors() Certain logging behaviors are available for debugging beyond those that should be enabled in production. |
static long | getOnProgressThreshold() Gets the threshold used to report progress on requests. |
static java.lang.String | getSdkVersion() Returns the current version of the Facebook SDK for Android as a string. |
static boolean | isDebugEnabled() Indicates if we are in debug mode. |
static boolean | isFacebookRequestCode(int requestCode) Returns true if the request code is within the range used by Facebook SDK requests. |
static boolean | isFullyInitialized() Indicates whether the Facebook SDK has been fully initialized. |
static boolean | isInitialized() Indicates whether the Facebook SDK has been initialized. |
static boolean | isLegacyTokenUpgradeSupported() Indicates if the SDK should fallback and read the legacy token. |
static boolean | isLoggingBehaviorEnabled(LoggingBehavior behavior) Certain logging behaviors are available for debugging beyond those that should be enabled in production. |
static void | publishInstallAsync(Context context, java.lang.String applicationId) This method is public in order to be used by app events, please don't use directly. |
static void | removeLoggingBehavior(LoggingBehavior behavior) Certain logging behaviors are available for debugging beyond those that should be enabled in production. |
static void | sdkInitialize(Context applicationContext) Deprecated. |
static void | sdkInitialize(Context applicationContext, FacebookSdk.InitializeCallback callback) Deprecated. |
static void | sdkInitialize(Context applicationContext, int callbackRequestCodeOffset) Deprecated. |
static void | sdkInitialize(Context applicationContext, int callbackRequestCodeOffset, FacebookSdk.InitializeCallback callback) Deprecated. |
static void | setAdvertiserIDCollectionEnabled(boolean flag) Sets the advertiserID collection flag for the application |
static void | setApplicationId(java.lang.String applicationId) Sets the Facebook application ID for the current app. |
static void | setApplicationName(java.lang.String applicationName) Sets the Facebook application name for the current app. |
static void | setAutoInitEnabled(boolean flag) Sets the auto init SDK flag for the application |
static void | setAutoLogAppEventsEnabled(boolean flag) Sets the auto logging events flag for the application AppEventsLogger |
static void | setCacheDir(java.io.File cacheDir) Sets the cache directory to use for caching responses, etc. |
static void | setClientToken(java.lang.String clientToken) Sets the Facebook client token for the current app. |
static void | setCodelessDebugLogEnabled(boolean flag) Sets the codeless debug flag for the application |
static void | setExecutor(java.util.concurrent.Executor executor) Sets the Executor used by the SDK for non-AsyncTask background work. |
static void | setFacebookDomain(java.lang.String facebookDomain) Sets the base Facebook domain to use when making Web requests. |
static void | setGraphApiVersion(java.lang.String graphApiVersion) Sets the Graph API version to use when making Graph requests. |
static void | setIsDebugEnabled(boolean enabled) Used to enable or disable logging, and other debug features. |
static void | setLegacyTokenUpgradeSupported(boolean supported) Setter for legacy token upgrade. |
static void | setLimitEventAndDataUsage(Context context, boolean limitEventUsage) Sets whether data such as those generated through AppEventsLogger and sent to Facebook should be restricted from being used for purposes other than analytics and conversions, such as targeting ads to this user. |
static void | setOnProgressThreshold(long threshold) Sets the threshold used to report progress on requests. |
Field Detail
APP_EVENT_PREFERENCES
public static final java.lang.String APP_EVENT_PREFERENCES
The key for AppEvent perfernece setting.
See Also:
APPLICATION_ID_PROPERTY
public static final java.lang.String APPLICATION_ID_PROPERTY
The key for the application ID in the Android manifest.
See Also:
APPLICATION_NAME_PROPERTY
public static final java.lang.String APPLICATION_NAME_PROPERTY
The key for the application name in the Android manifest.
See Also:
CLIENT_TOKEN_PROPERTY
public static final java.lang.String CLIENT_TOKEN_PROPERTY
The key for the client token in the Android manifest.
See Also:
WEB_DIALOG_THEME
public static final java.lang.String WEB_DIALOG_THEME
The key for the web dialog theme in the Android manifest.
See Also:
AUTO_INIT_ENABLED_PROPERTY
public static final java.lang.String AUTO_INIT_ENABLED_PROPERTY
The key for the auto init SDK in the Android manifest.
See Also:
AUTO_LOG_APP_EVENTS_ENABLED_PROPERTY
public static final java.lang.String AUTO_LOG_APP_EVENTS_ENABLED_PROPERTY
The key for the auto logging app events in the Android manifest.
See Also:
CODELESS_DEBUG_LOG_ENABLED_PROPERTY
public static final java.lang.String CODELESS_DEBUG_LOG_ENABLED_PROPERTY
The key for the auto log codeless in the Android manifest.
See Also:
ADVERTISER_ID_COLLECTION_ENABLED_PROPERTY
public static final java.lang.String ADVERTISER_ID_COLLECTION_ENABLED_PROPERTY
The key for the advertiserID collection in the Android manifest.
See Also:
CALLBACK_OFFSET_PROPERTY
public static final java.lang.String CALLBACK_OFFSET_PROPERTY
The key for the callback off set in the Android manifest.
See Also:
Method Detail
sdkInitialize
@Deprecated public static void sdkInitialize(Context applicationContext, int callbackRequestCodeOffset)
Deprecated.
This function initializes the Facebook SDK. This function is called automatically on app start up if the proper entries are listed in the AndroidManifest, such as the facebook app id. This method can be called manually if needed. The behavior of Facebook SDK functions are undetermined if this function is not called. It should be called as early as possible. As part of SDK initialization basic auto logging of app events will occur, this can be controlled via 'com.facebook.sdk.AutoLogAppEventsEnabled' manifest setting
Parameters:
applicationContext
- The application contextcallbackRequestCodeOffset
- The request code offset that Facebook activities will be called with. Please do not use the range between the value you set and another 100 entries after it in your other requests.sdkInitialize
@Deprecated public static void sdkInitialize(Context applicationContext, int callbackRequestCodeOffset, FacebookSdk.InitializeCallback callback)
Deprecated.
This function initializes the Facebook SDK. This function is called automatically on app start up if the proper entries are listed in the AndroidManifest, such as the facebook app id. This method can be called manually if needed. The behavior of Facebook SDK functions are undetermined if this function is not called. It should be called as early as possible. As part of SDK initialization basic auto logging of app events will occur, this can be controlled via 'com.facebook.sdk.AutoLogAppEventsEnabled' manifest setting
Parameters:
applicationContext
- The application contextcallbackRequestCodeOffset
- The request code offset that Facebook activities will be called with. Please do not use the range between the value you set and another 100 entries after it in your other requests.callback
- A callback called when initialize finishes. This will be called even if the sdk is already initialized.sdkInitialize
@Deprecated public static void sdkInitialize(Context applicationContext)
Deprecated.
This function initializes the Facebook SDK. This function is called automatically on app start up if the proper entries are listed in the AndroidManifest, such as the facebook app id. This method can bee called manually if needed. The behavior of Facebook SDK functions are undetermined if this function is not called. It should be called as early as possible. As part of SDK initialization basic auto logging of app events will occur, this can be controlled via 'com.facebook.sdk.AutoLogAppEventsEnabled' manifest setting
Parameters:
applicationContext
- The application contextsdkInitialize
@Deprecated public static void sdkInitialize(Context applicationContext, FacebookSdk.InitializeCallback callback)
Deprecated.
This function initializes the Facebook SDK. This function is called automatically on app start up if the proper entries are listed in the AndroidManifest, such as the facebook app id. This method can bee called manually if needed. The behavior of Facebook SDK functions are undetermined if this function is not called. It should be called as early as possible. As part of SDK initialization basic auto logging of app events will occur, this can be controlled via 'com.facebook.sdk.AutoLogAppEventsEnabled' manifest setting
Parameters:
applicationContext
- The application contextcallback
- A callback called when initialize finishes. This will be called even if the sdk is already initialized.isInitialized
public static boolean isInitialized()
Indicates whether the Facebook SDK has been initialized.
Returns:
true if initialized, false if not
isFullyInitialized
public static boolean isFullyInitialized()
Indicates whether the Facebook SDK has been fully initialized. Facebook SDK won't work before fully initialized.
Returns:
true if fully initialized, false if not
fullyInitialize
public static void fullyInitialize()
Mark Facebook SDK fully intialized to make it works as expected.
getLoggingBehaviors
public static java.util.Set<LoggingBehavior> getLoggingBehaviors()
Certain logging behaviors are available for debugging beyond those that should be enabled in production. Returns the types of extended logging that are currently enabled.
Returns:
a set containing enabled logging behaviors
addLoggingBehavior
public static void addLoggingBehavior(LoggingBehavior behavior)
Certain logging behaviors are available for debugging beyond those that should be enabled in production. Enables a particular extended logging in the SDK.
Parameters:
behavior
- The LoggingBehavior to enableremoveLoggingBehavior
public static void removeLoggingBehavior(LoggingBehavior behavior)
Certain logging behaviors are available for debugging beyond those that should be enabled in production. Disables a particular extended logging behavior in the SDK.
Parameters:
behavior
- The LoggingBehavior to disableclearLoggingBehaviors
public static void clearLoggingBehaviors()
Certain logging behaviors are available for debugging beyond those that should be enabled in production. Disables all extended logging behaviors.
isLoggingBehaviorEnabled
public static boolean isLoggingBehaviorEnabled(LoggingBehavior behavior)
Certain logging behaviors are available for debugging beyond those that should be enabled in production. Checks if a particular extended logging behavior is enabled.
Parameters:
behavior
- The LoggingBehavior to checkReturns:
whether behavior is enabled
isDebugEnabled
public static boolean isDebugEnabled()
Indicates if we are in debug mode.
setIsDebugEnabled
public static void setIsDebugEnabled(boolean enabled)
Used to enable or disable logging, and other debug features. Defaults to BuildConfig.DEBUG.
Parameters:
enabled
- Debug features (like logging) are enabled if true, disabled if false.isLegacyTokenUpgradeSupported
public static boolean isLegacyTokenUpgradeSupported()
Indicates if the SDK should fallback and read the legacy token. This is turned off by default for performance.
Returns:
if the legacy token upgrade is supported.
setLegacyTokenUpgradeSupported
public static void setLegacyTokenUpgradeSupported(boolean supported)
Setter for legacy token upgrade.
Parameters:
supported
- True if upgrade should be supported.getExecutor
public static java.util.concurrent.Executor getExecutor()
Returns the Executor used by the SDK for non-AsyncTask background work. By default this uses AsyncTask Executor via reflection if the API level is high enough. Otherwise this creates a new Executor with defaults similar to those used in AsyncTask.
Returns:
an Executor used by the SDK. This will never be null.
setExecutor
public static void setExecutor(java.util.concurrent.Executor executor)
Sets the Executor used by the SDK for non-AsyncTask background work.
Parameters:
executor
- the Executor to use; must not be null.getFacebookDomain
public static java.lang.String getFacebookDomain()
Gets the base Facebook domain to use when making Web requests; in production code this will normally be "facebook.com". However certain Access Tokens are meant to be used with other domains. Currently gaming -> fb.gg This checks the current Access Token (if any) and returns the correct domain to use.
Returns:
the Facebook domain
setFacebookDomain
public static void setFacebookDomain(java.lang.String facebookDomain)
Sets the base Facebook domain to use when making Web requests. This defaults to "facebook.com", but may be overridden to, e.g., "beta.facebook.com" to direct requests at a different domain. This method should never be called from production code.
Parameters:
facebookDomain
- the base domain to use instead of "facebook.com"getApplicationContext
public static Context getApplicationContext()
The getter for the context of the current application.
Returns:
The context of the current application.
setGraphApiVersion
public static void setGraphApiVersion(java.lang.String graphApiVersion)
Sets the Graph API version to use when making Graph requests. This defaults to the latest Graph API version at the time when the Facebook SDK is shipped.
Parameters:
graphApiVersion
- the Graph API version, it should be of the form ServerProtocol.getDefaultAPIVersion()getGraphApiVersion
public static java.lang.String getGraphApiVersion()
Returns the Graph API version to use when making Graph requests. This defaults to the latest Graph API version at the time when the Facebook SDK is shipped.
Returns:
the Graph API version to use.
publishInstallAsync
public static void publishInstallAsync(Context context, java.lang.String applicationId)
This method is public in order to be used by app events, please don't use directly.
Parameters:
context
- The application context.applicationId
- The application id.getSdkVersion
public static java.lang.String getSdkVersion()
Returns the current version of the Facebook SDK for Android as a string.
Returns:
the current version of the SDK
getLimitEventAndDataUsage
public static boolean getLimitEventAndDataUsage(Context context)
Returns whether data such as those generated through AppEventsLogger and sent to Facebook should be restricted from being used for purposes other than analytics and conversions, such as targeting ads to this user. Defaults to false. This value is stored on the device and persists across app launches.
Parameters:
context
- Used to read the value.setLimitEventAndDataUsage
public static void setLimitEventAndDataUsage(Context context, boolean limitEventUsage)
Sets whether data such as those generated through AppEventsLogger and sent to Facebook should be restricted from being used for purposes other than analytics and conversions, such as targeting ads to this user. Defaults to false. This value is stored on the device and persists across app launches. Changes to this setting will apply to app events currently queued to be flushed.
Parameters:
context
- Used to persist this value across app runs.getOnProgressThreshold
public static long getOnProgressThreshold()
Gets the threshold used to report progress on requests.
setOnProgressThreshold
public static void setOnProgressThreshold(long threshold)
Sets the threshold used to report progress on requests. Note that the value will be read when the request is started and cannot be changed during a request (or batch) execution.
Parameters:
threshold
- The number of bytes progressed to force a callback.getApplicationSignature
public static java.lang.String getApplicationSignature(Context context)
Internal call please don't use directly.
Parameters:
context
- The application context.Returns:
The application signature.
getApplicationId
public static java.lang.String getApplicationId()
Gets the Facebook application ID for the current app. This should only be called after the SDK has been initialized by calling FacebookSdk.sdkInitialize().
Returns:
the application ID
setApplicationId
public static void setApplicationId(java.lang.String applicationId)
Sets the Facebook application ID for the current app.
Parameters:
applicationId
- the application IDgetApplicationName
public static java.lang.String getApplicationName()
Gets the Facebook application name of the current app. This should only be called after the SDK has been initialized by calling FacebookSdk.sdkInitialize().
Returns:
the application name
setApplicationName
public static void setApplicationName(java.lang.String applicationName)
Sets the Facebook application name for the current app.
Parameters:
applicationName
- the application namegetClientToken
public static java.lang.String getClientToken()
Gets the client token for the current app. This will be null unless explicitly set or unless loadDefaultsFromMetadata has been called.
Returns:
the client token
setClientToken
public static void setClientToken(java.lang.String clientToken)
Sets the Facebook client token for the current app.
Parameters:
clientToken
- the client tokengetAutoInitEnabled
public static boolean getAutoInitEnabled()
Returns:
the auto init SDK flag for the application
setAutoInitEnabled
public static void setAutoInitEnabled(boolean flag)
Sets the auto init SDK flag for the application
Parameters:
flag
- true or false When flag is false, SDK is not fully initialized.getAutoLogAppEventsEnabled
public static boolean getAutoLogAppEventsEnabled()
Gets the flag used by
AppEventsLogger
Returns:
the auto logging events flag for the application
setAutoLogAppEventsEnabled
public static void setAutoLogAppEventsEnabled(boolean flag)
Sets the auto logging events flag for the application
AppEventsLogger
Parameters:
flag
- true or false When flag is false, events will not be logged, see AutomaticAnalyticsLogger
getCodelessDebugLogEnabled
public static boolean getCodelessDebugLogEnabled()
Returns:
the codeless debug flag for the application
getCodelessSetupEnabled
public static boolean getCodelessSetupEnabled()
Returns:
the codeless enabled flag for the application
setAdvertiserIDCollectionEnabled
public static void setAdvertiserIDCollectionEnabled(boolean flag)
Sets the advertiserID collection flag for the application
Parameters:
flag
- true or falsegetAdvertiserIDCollectionEnabled
public static boolean getAdvertiserIDCollectionEnabled()
Returns:
the advertiserID collection flag for the application
setCodelessDebugLogEnabled
public static void setCodelessDebugLogEnabled(boolean flag)
Sets the codeless debug flag for the application
Parameters:
flag
- true or falsegetCacheDir
public static java.io.File getCacheDir()
Gets the cache directory to use for caching responses, etc. The default will be the value returned by Context.getCacheDir() when the SDK was initialized, but it can be overridden.
Returns:
the cache directory
setCacheDir
public static void setCacheDir(java.io.File cacheDir)
Sets the cache directory to use for caching responses, etc.
Parameters:
cacheDir
- the cache directorygetCallbackRequestCodeOffset
public static int getCallbackRequestCodeOffset()
Getter for the callback request code offset. The request codes starting at this offset and the next 100 values are used by the Facebook SDK.
Returns:
The callback request code offset.
isFacebookRequestCode
public static boolean isFacebookRequestCode(int requestCode)
Returns true if the request code is within the range used by Facebook SDK requests. This does not include request codes that you explicitly set on the dialogs, buttons or LoginManager. The range of request codes that the SDK uses starts at the callbackRequestCodeOffset and continues for the next 100 values.
Parameters:
requestCode
- the request code to check.Returns:
true if the request code is within the range used by the Facebook SDK.