Code example for Uri

Methods: getQueryParameter

0
            String sortOrder) {
 
        XmlPullParser parser = null;
        mHttpClient = null;
 
        final String url = uri.getQueryParameter("url");
        if (url != null) {
            parser = getUriXmlPullParser(url);
        } else { 
            final String resource = uri.getQueryParameter("resource");
            if (resource != null) {
                Uri resourceUri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
                        getContext().getPackageName() + "/" + resource);
                parser = getResourceXmlPullParser(resourceUri);
            } 
        } 
 
        if (parser != null) {
            XMLCursor xmlCursor = new XMLCursor(selection, projection);
            try { 
                xmlCursor.parseWith(parser);