當前位置: 首頁>>代碼示例>>Java>>正文


Java Parse.LOG_LEVEL_ERROR屬性代碼示例

本文整理匯總了Java中com.parse.Parse.LOG_LEVEL_ERROR屬性的典型用法代碼示例。如果您正苦於以下問題:Java Parse.LOG_LEVEL_ERROR屬性的具體用法?Java Parse.LOG_LEVEL_ERROR怎麽用?Java Parse.LOG_LEVEL_ERROR使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在com.parse.Parse的用法示例。


在下文中一共展示了Parse.LOG_LEVEL_ERROR屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getMergedOptions

private Bundle getMergedOptions() {
  // Read activity metadata from AndroidManifest.xml
  ActivityInfo activityInfo = null;
  try {
    activityInfo = getPackageManager().getActivityInfo(
        this.getComponentName(), PackageManager.GET_META_DATA);
  } catch (NameNotFoundException e) {
    if (Parse.getLogLevel() <= Parse.LOG_LEVEL_ERROR &&
        Log.isLoggable(LOG_TAG, Log.WARN)) {
      Log.w(LOG_TAG, e.getMessage());
    }
  }

  // The options specified in the Intent (from ParseLoginBuilder) will
  // override any duplicate options specified in the activity metadata
  Bundle mergedOptions = new Bundle();
  if (activityInfo != null && activityInfo.metaData != null) {
    mergedOptions.putAll(activityInfo.metaData);
  }
  if (getIntent().getExtras() != null) {
    mergedOptions.putAll(getIntent().getExtras());
  }

  return mergedOptions;
}
 
開發者ID:rutvijkumarshah,項目名稱:WatsiAndroidApp,代碼行數:25,代碼來源:ParseLoginActivity.java

示例2: getMergedOptions

private Bundle getMergedOptions() {
    // Read activity metadata from AndroidManifest.xml
    ActivityInfo activityInfo = null;
    try {
        activityInfo = getPackageManager().getActivityInfo(
                this.getComponentName(), PackageManager.GET_META_DATA);
    } catch (NameNotFoundException e) {
        if (Parse.getLogLevel() <= Parse.LOG_LEVEL_ERROR &&
                Log.isLoggable("ParseLoginActivity", Log.WARN)) {
            Log.w("ParseLoginActivity", e.getMessage());
        }
    }

    // The options specified in the Intent (from ParseLoginBuilder) will
    // override any duplicate options specified in the activity metadata
    Bundle mergedOptions = new Bundle();
    if (activityInfo != null && activityInfo.metaData != null) {
        mergedOptions.putAll(activityInfo.metaData);
    }
    if (getIntent().getExtras() != null) {
        mergedOptions.putAll(getIntent().getExtras());
    }

    return mergedOptions;
}
 
開發者ID:LibertACAO,項目名稱:libertacao-android,代碼行數:25,代碼來源:ParseLoginActivity.java

示例3: fromBundle

/**
 * Constructs a ParseLoginConfig object from a bundle. Unrecognized keys are
 * ignored.
 * <p/>
 * This can be used to pass an ParseLoginConfig object between activities, or
 * to read settings from an activity's meta-data in Manefest.xml.
 *
 * @param bundle
 *     The Bundle representation of the ParseLoginConfig object.
 * @param context
 *     The context for resolving resource IDs.
 * @return The ParseLoginConfig instance.
 */
public static ParseLoginConfig fromBundle(Bundle bundle, Context context) {
  ParseLoginConfig config = new ParseLoginConfig();
  Set<String> keys = bundle.keySet();

  if (keys.contains(APP_LOGO)) {
    config.setAppLogo(bundle.getInt(APP_LOGO));
  }

  if (keys.contains(PARSE_LOGIN_ENABLED)) {
    config.setParseLoginEnabled(bundle.getBoolean(PARSE_LOGIN_ENABLED));
  }
  if (keys.contains(PARSE_LOGIN_BUTTON_TEXT)) {
    config.setParseLoginButtonText(bundle.getCharSequence(PARSE_LOGIN_BUTTON_TEXT));
  }
  if (keys.contains(PARSE_SIGNUP_BUTTON_TEXT)) {
    config.setParseSignupButtonText(bundle.getCharSequence(PARSE_SIGNUP_BUTTON_TEXT));
  }
  if (keys.contains(PARSE_LOGIN_HELP_TEXT)) {
    config.setParseLoginHelpText(bundle.getCharSequence(PARSE_LOGIN_HELP_TEXT));
  }
  if (keys.contains(PARSE_LOGIN_INVALID_CREDENTIALS_TOAST_TEXT)) {
    config.setParseLoginInvalidCredentialsToastText(bundle
        .getCharSequence(PARSE_LOGIN_INVALID_CREDENTIALS_TOAST_TEXT));
  }
  if (keys.contains(PARSE_LOGIN_EMAIL_AS_USERNAME)) {
    config.setParseLoginEmailAsUsername(bundle.getBoolean(PARSE_LOGIN_EMAIL_AS_USERNAME));
  }
  if (keys.contains(PARSE_SIGNUP_MIN_PASSWORD_LENGTH)) {
    config.setParseSignupMinPasswordLength(bundle.getInt(PARSE_SIGNUP_MIN_PASSWORD_LENGTH));
  }
  if (keys.contains(PARSE_SIGNUP_SUBMIT_BUTTON_TEXT)) {
    config.setParseSignupSubmitButtonText(bundle.getCharSequence(PARSE_SIGNUP_SUBMIT_BUTTON_TEXT));
  }

  if (keys.contains(FACEBOOK_LOGIN_ENABLED)) {
    config.setFacebookLoginEnabled(bundle.getBoolean(FACEBOOK_LOGIN_ENABLED));
  }
  if (keys.contains(FACEBOOK_LOGIN_BUTTON_TEXT)) {
    config.setFacebookLoginButtonText(bundle.getCharSequence(FACEBOOK_LOGIN_BUTTON_TEXT));
  }
  if (keys.contains(FACEBOOK_LOGIN_PERMISSIONS) &&
      bundle.getInt(FACEBOOK_LOGIN_PERMISSIONS) != 0) {
    // Only for converting from activity meta-data.
    try {
      config.setFacebookLoginPermissions(stringArrayToCollection(context
          .getResources().getStringArray(
              bundle.getInt(FACEBOOK_LOGIN_PERMISSIONS))));
    } catch (NotFoundException e) {
      if (Parse.getLogLevel() <= Parse.LOG_LEVEL_ERROR) {
        Log.w(LOG_TAG, "Facebook permission string array resource not found");
      }
    }
  } else if (keys.contains(FACEBOOK_LOGIN_PERMISSIONS_STRING_ARRAY)) {
    // For converting from a bundle produced by this class's toBundle()
    config.setFacebookLoginPermissions(stringArrayToCollection(bundle
        .getStringArray(FACEBOOK_LOGIN_PERMISSIONS_STRING_ARRAY)));
  }

  if (keys.contains(TWITTER_LOGIN_ENABLED)) {
    config.setTwitterLoginEnabled(bundle.getBoolean(TWITTER_LOGIN_ENABLED));
  }
  if (keys.contains(TWITTER_LOGIN_BUTTON_TEXT)) {
    config.setTwitterLoginButtonText(bundle
        .getCharSequence(TWITTER_LOGIN_BUTTON_TEXT));
  }

  return config;
}
 
開發者ID:LibertACAO,項目名稱:libertacao-android,代碼行數:81,代碼來源:ParseLoginConfig.java


注:本文中的com.parse.Parse.LOG_LEVEL_ERROR屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。