Code example for Uri

Methods: getQueryParametertoString

    // This is a convenience function to create an image list from a Uri. 
    public static IImageList makeImageList(ContentResolver cr, Uri uri,
            int sort) {
        String uriString = (uri != null) ? uri.toString() : "";
        // TODO: we need to figure out whether we're viewing 
        // DRM images in a better way.  Is there a constant 
        // for content://drm somewhere?? 
        if (uriString.startsWith("content://drm")) {
            return makeImageList(cr, DataLocation.ALL, INCLUDE_DRM_IMAGES, sort,
        } else if (uriString.startsWith("content://media/external/video")) {
            return makeImageList(cr, DataLocation.EXTERNAL, INCLUDE_VIDEOS,
                    sort, null);
        } else if (isSingleImageMode(uriString)) {
            return makeSingleImageList(cr, uri);
        } else { 
            String bucketId = uri.getQueryParameter("bucketId");
            return makeImageList(cr, DataLocation.ALL, INCLUDE_IMAGES, sort,