Code example for Uri

Methods: getPathSegments

0
        switch (matcher.match(uri)) {
            case CODE_COLLECTION:
                // Nothing needed here 
                break; 
            case CODE_SINGLE:
                builder.appendWhere(BaseColumns._ID + "=" + uri.getPathSegments().get(1));
                break; 
            default: 
                throw new IllegalArgumentException("Unknown URI: " + uri);
        } 
    } 
}