Code example for Intent

Methods: hasExtra

                    .putExtra(EXTRA_WRITE_PRIVACY, ensureDefaultAudience(audience));
        return validateKatanaActivityIntent(context, intent);
    public static boolean isErrorResult(Intent resultIntent) {
        return resultIntent.hasExtra(STATUS_ERROR_TYPE);
    public static Exception getErrorFromResult(Intent resultIntent) {
        if (!isErrorResult(resultIntent)) {
            return null; 
        String type = resultIntent.getStringExtra(STATUS_ERROR_TYPE);
        String description = resultIntent.getStringExtra(STATUS_ERROR_DESCRIPTION);
        if (type.equalsIgnoreCase(ERROR_USER_CANCELED)) {
            return new FacebookOperationCanceledException(description);
        /* TODO parse error values and create appropriate exception class */ 
Connect your IDE to all the code out there  Get Codota for Java