当前位置: 首页>>代码示例>>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;未经允许,请勿转载。