I am Developing an application which consists of video-view,Here is my problem
Actual what i did was: code here
if (responseCode == HttpURLConnection.HTTP_OK) {
InputStream in = httpConnection.getInputStream();
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document dom = db.parse(in);
Element docEle = dom.getDocumentElement();
NodeList nl = docEle.getElementsByTagName("entry");
if (nl != null && nl.getLength() > 0) {
for (int i = 0 ; i < nl.getLength(); i++) {
Element entry = (Element)nl.item(i);
Element title = (Element)entry.getElementsByTagName("title").item(0);
String titleStr = title.getFirstChild().getNodeValue();
Element content = (Element)entry.getElementsByTagName("content").item(0);
String contentStr = content.getAttribute("src");
Element rsp = (Element)entry.getElementsByTagName("media:content").item(1);
String anotherurl=rsp.getAttribute("url");
// System.out.println("content uri"+anotherurl);
Element photoUrl = (Element)entry.getElementsByTagName("media:thumbnail").item(0);
String photoStr = photoUrl.getAttribute("url");
JSONObject temp = new JSONObject();
try {
temp.put("Title", titleStr);
temp.put("Content", contentStr);
temp.put("PhotoUrl", photoStr);
temp.put("VideoUrl", anotherurl);
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
collection.put(temp);
//VideoCell cell = new VideoCell(titleStr);
}
}
}
Here string named anotherurl is the url you looking for rtsp url.
Hope it helps.