Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package com.vijay.Splash; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; import java.util.ArrayList; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; import android.app.ListActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.ArrayAdapter; import android.widget.ListView; public class MogoMenu extends ListActivity { ArrayList linksArray = new ArrayList(); ArrayList itemsArray = new ArrayList(); private static final int ACTIVITY_BOOKS=1; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setListAdapter(new ArrayAdapter(this,android.R.layout.simple_list_item_1, MENU_NAMES)); } private static final String[] MENU_NAMES = new String[] { "My Bookshelf", "On the Go", "Options", "Help", }; public void onListItemClick(ListView l, View v, int position, long id) { // Pre-load the image then start the animation System.out.println("LISTVIEW" +getListView().toString()); System.out.println("On Item Click" +position); if(position == 0) { DownloadBookShelf("http://xmlgwdev.lotusbookworks.com/?acctid=0bfHgPce7k:Hiw6hsB4fx&listID=1"); //setListAdapter(new ArrayAdapter(this,android.R.layout.simple_list_item_1,itemsArray)); Intent i = new Intent(this, ViewBook.class); i.putExtra("bookTitle", id); i.putStringArrayListExtra("bookLink",linksArray); startActivity(i); finish(); } else if(position == 3) { setContentView(R.layout.help); } } public InputStream OpenHttpConnection(String urlString) throws IOException { InputStream in = null; int response = -1; URL url = new URL(urlString); URLConnection conn = url.openConnection(); System.out.println("Opening Connection"); if (!(conn instanceof HttpURLConnection)) throw new IOException("Not an HTTP connection"); try { System.out.println("Obtaining CONNECTION"); HttpURLConnection httpConn = (HttpURLConnection) conn; httpConn.setAllowUserInteraction(false); httpConn.setInstanceFollowRedirects(true); httpConn.setRequestMethod("GET"); System.out.println("Connecting"); httpConn.connect(); response = httpConn.getResponseCode(); if (response == HttpURLConnection.HTTP_OK) { System.out.println("SUPER CONNECTION"); in = httpConn.getInputStream(); System.out.println("Bitmap puttin into IMG1"); } } catch (Exception ex) { throw new IOException("Error connecting"); } return in; } /*Download XML RSS feed*/ private void DownloadBookShelf(String URL) { InputStream in = null; try { in = OpenHttpConnection(URL); Document doc = null; DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db; try { db = dbf.newDocumentBuilder(); doc = db.parse(in); } catch (ParserConfigurationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SAXException e) { // TODO Auto-generated catch block e.printStackTrace(); } doc.getDocumentElement().normalize(); itemsArray.clear(); linksArray.clear(); String strTitle = null; String strLink = null; NodeList itemNodesList = doc.getElementsByTagName("a"); for (int i = 0; i < itemNodesList.getLength(); i++) { Node itemNode = itemNodesList.item(i); if (itemNode.getNodeType() == Node.ELEMENT_NODE) { //---convert the Node into an Element--- Element itemElement = (Element) itemNode; //---get all the TITLES element under the NodeList titleNodes = (itemElement).getElementsByTagName("a"); Element titleElement = (Element) titleNodes.item(0); //---get all the child nodes under the element--- NodeList textitemNodes = ((Node) titleElement).getChildNodes(); //---retrieve the text of the <title> element--- strTitle = ((Node) textitemNodes.item(0)).getNodeValue(); itemsArray.add(strTitle); System.out.println("ITEM : "+strTitle); } } for (int i = 0; i < itemNodesList.getLength(); i++) { strLink = ((Element) itemNodesList.item(i)).getAttribute("href"); linksArray.add(strTitle); System.out.println("URL LINK: "+strLink); } in.close(); } catch (IOException e1) { e1.printStackTrace(); } } }