Java Code Examples for com.facebook.internal.Utility#queryAppSettings()

The following examples show how to use com.facebook.internal.Utility#queryAppSettings() . 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: LoginButton.java    From android-skeleton-project with MIT License 6 votes vote down vote up
private void checkNuxSettings() {
    if (nuxMode == ToolTipMode.DISPLAY_ALWAYS) {
        String nuxString = getResources().getString(R.string.com_facebook_tooltip_default);
        displayNux(nuxString);
    } else {
        // kick off an async request
        final String appId = Utility.getMetadataApplicationId(getContext());
        AsyncTask<Void, Void, FetchedAppSettings> task = new AsyncTask<Void, Void, Utility.FetchedAppSettings>() {
            @Override
            protected FetchedAppSettings doInBackground(Void... params) {
                FetchedAppSettings settings = Utility.queryAppSettings(appId, false);
                return settings;
            }

            @Override
            protected void onPostExecute(FetchedAppSettings result) {
                showNuxPerSettings(result);
            }
        };
        task.execute((Void[])null);
    }

}
 
Example 2
Source File: LoginButton.java    From FacebookImageShareIntent with MIT License 6 votes vote down vote up
private void checkNuxSettings() {
    if (nuxMode == ToolTipMode.DISPLAY_ALWAYS) {
        String nuxString = getResources().getString(R.string.com_facebook_tooltip_default);
        displayNux(nuxString);
    } else {
        // kick off an async request
        final String appId = Utility.getMetadataApplicationId(getContext());
        AsyncTask<Void, Void, FetchedAppSettings> task = new AsyncTask<Void, Void, Utility.FetchedAppSettings>() {
            @Override
            protected FetchedAppSettings doInBackground(Void... params) {
                FetchedAppSettings settings = Utility.queryAppSettings(appId, false);
                return settings;
            }

            @Override
            protected void onPostExecute(FetchedAppSettings result) {
                showNuxPerSettings(result);
            }
        };
        task.execute((Void[])null);
    }

}
 
Example 3
Source File: LoginButton.java    From Abelana-Android with Apache License 2.0 6 votes vote down vote up
private void checkNuxSettings() {
    if (nuxMode == ToolTipMode.DISPLAY_ALWAYS) {
        String nuxString = getResources().getString(R.string.com_facebook_tooltip_default);
        displayNux(nuxString);
    } else {
        // kick off an async request
        final String appId = Utility.getMetadataApplicationId(getContext());
        AsyncTask<Void, Void, FetchedAppSettings> task = new AsyncTask<Void, Void, Utility.FetchedAppSettings>() {
            @Override
            protected FetchedAppSettings doInBackground(Void... params) {
                FetchedAppSettings settings = Utility.queryAppSettings(appId, false);
                return settings;
            }

            @Override
            protected void onPostExecute(FetchedAppSettings result) {
                showNuxPerSettings(result);
            }
        };
        task.execute((Void[])null);
    }

}
 
Example 4
Source File: LoginButton.java    From facebook-api-android-maven with Apache License 2.0 6 votes vote down vote up
private void checkNuxSettings() {
    if (nuxMode == ToolTipMode.DISPLAY_ALWAYS) {
        String nuxString = getResources().getString(R.string.com_facebook_tooltip_default);
        displayNux(nuxString);
    } else {
        // kick off an async request
        final String appId = Utility.getMetadataApplicationId(getContext());
        AsyncTask<Void, Void, FetchedAppSettings> task = new AsyncTask<Void, Void, Utility.FetchedAppSettings>() {
            @Override
            protected FetchedAppSettings doInBackground(Void... params) {
                FetchedAppSettings settings = Utility.queryAppSettings(appId, false);
                return settings;
            }

            @Override
            protected void onPostExecute(FetchedAppSettings result) {
                showNuxPerSettings(result);
            }
        };
        task.execute((Void[])null);
    }

}