Java Code Examples for com.facebook.internal.Validate#sdkInitialized()

The following examples show how to use com.facebook.internal.Validate#sdkInitialized() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AccessTokenTracker.java    From kognitivo with Apache License 2.0 5 votes vote down vote up
/**
 * The constructor.
 */
public AccessTokenTracker() {
    Validate.sdkInitialized();

    this.receiver = new CurrentAccessTokenBroadcastReceiver();
    this.broadcastManager = LocalBroadcastManager.getInstance(
            FacebookSdk.getApplicationContext());

    startTracking();
}
 
Example 2
Source File: FacebookSdk.java    From letv with Apache License 2.0 4 votes vote down vote up
public static File getCacheDir() {
    Validate.sdkInitialized();
    return (File) cacheDir.getValue();
}
 
Example 3
Source File: FacebookSdk.java    From letv with Apache License 2.0 4 votes vote down vote up
public static int getWebDialogTheme() {
    Validate.sdkInitialized();
    return webDialogTheme;
}
 
Example 4
Source File: FacebookSdk.java    From letv with Apache License 2.0 4 votes vote down vote up
public static String getClientToken() {
    Validate.sdkInitialized();
    return appClientToken;
}
 
Example 5
Source File: FacebookSdk.java    From letv with Apache License 2.0 4 votes vote down vote up
public static String getApplicationName() {
    Validate.sdkInitialized();
    return applicationName;
}
 
Example 6
Source File: FacebookSdk.java    From letv with Apache License 2.0 4 votes vote down vote up
public static String getApplicationId() {
    Validate.sdkInitialized();
    return applicationId;
}
 
Example 7
Source File: FacebookSdk.java    From letv with Apache License 2.0 4 votes vote down vote up
public static int getCallbackRequestCodeOffset() {
    Validate.sdkInitialized();
    return callbackRequestCodeOffset;
}
 
Example 8
Source File: FacebookSdk.java    From letv with Apache License 2.0 4 votes vote down vote up
public static long getOnProgressThreshold() {
    Validate.sdkInitialized();
    return onProgressThreshold.get();
}
 
Example 9
Source File: FacebookSdk.java    From letv with Apache License 2.0 4 votes vote down vote up
public static boolean getLimitEventAndDataUsage(Context context) {
    Validate.sdkInitialized();
    return context.getSharedPreferences("com.facebook.sdk.appEventPreferences", 0).getBoolean("limitEventUsage", false);
}
 
Example 10
Source File: FacebookSdk.java    From letv with Apache License 2.0 4 votes vote down vote up
public static Context getApplicationContext() {
    Validate.sdkInitialized();
    return applicationContext;
}
 
Example 11
Source File: LoginManager.java    From kognitivo with Apache License 2.0 4 votes vote down vote up
LoginManager() {
    Validate.sdkInitialized();
}
 
Example 12
Source File: FacebookSdk.java    From kognitivo with Apache License 2.0 4 votes vote down vote up
/**
 * Gets the theme used by {@link com.facebook.internal.WebDialog}
 * @return the theme
 */
public static int getWebDialogTheme() {
    Validate.sdkInitialized();
    return webDialogTheme;
}
 
Example 13
Source File: FacebookSdk.java    From kognitivo with Apache License 2.0 4 votes vote down vote up
/**
 * Gets the threshold used to report progress on requests.
 */
public static long getOnProgressThreshold() {
    Validate.sdkInitialized();
    return onProgressThreshold.get();
}
 
Example 14
Source File: FacebookSdk.java    From kognitivo with Apache License 2.0 4 votes vote down vote up
/**
 * The getter for the context of the current application.
 * @return The context of the current application.
 */
public static Context getApplicationContext() {
    Validate.sdkInitialized();
    return applicationContext;
}
 
Example 15
Source File: FacebookSdk.java    From kognitivo with Apache License 2.0 3 votes vote down vote up
/**
 * 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.
 *
 * @param context  Used to read the value.
 */
public static boolean getLimitEventAndDataUsage(Context context) {
    Validate.sdkInitialized();
    SharedPreferences preferences = context.getSharedPreferences(
            AppEventsLogger.APP_EVENT_PREFERENCES, Context.MODE_PRIVATE);
    return preferences.getBoolean("limitEventUsage", false);
}
 
Example 16
Source File: FacebookSdk.java    From kognitivo with Apache License 2.0 2 votes vote down vote up
/**
 * 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.
 *
 * @return The callback request code offset.
 */
public static int getCallbackRequestCodeOffset() {
    Validate.sdkInitialized();
    return callbackRequestCodeOffset;
}
 
Example 17
Source File: FacebookSdk.java    From kognitivo with Apache License 2.0 2 votes vote down vote up
/**
 * 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.
 *
 * @return the cache directory
 */
public static File getCacheDir() {
    Validate.sdkInitialized();
    return cacheDir.getValue();
}
 
Example 18
Source File: FacebookSdk.java    From kognitivo with Apache License 2.0 2 votes vote down vote up
/**
 * Gets the client token for the current app. This will be null unless explicitly set or unless
 * loadDefaultsFromMetadata has been called.
 * @return the client token
 */
public static String getClientToken() {
    Validate.sdkInitialized();
    return appClientToken;
}
 
Example 19
Source File: FacebookSdk.java    From kognitivo with Apache License 2.0 2 votes vote down vote up
/**
 * Gets the Facebook application name of the current app. This should only be called after the
 * SDK has been initialized by calling FacebookSdk.sdkInitialize().
 *
 * @return the application name
 */
public static String getApplicationName() {
    Validate.sdkInitialized();
    return applicationName;
}
 
Example 20
Source File: FacebookSdk.java    From kognitivo with Apache License 2.0 2 votes vote down vote up
/**
 * Gets the Facebook application ID for the current app. This should only be called after the
 * SDK has been initialized by calling FacebookSdk.sdkInitialize().
 *
 * @return the application ID
 */
public static String getApplicationId() {
    Validate.sdkInitialized();
    return applicationId;
}