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.achie.test; import java.net.URL; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.InputSource; import org.xml.sax.XMLReader; import android.app.Activity; import android.app.Dialog; import android.app.ProgressDialog; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class ProgressBarSample extends Activity{ static final int PROGRESS_DIALOG = 0; Button button; ProgressDialog progressDialog; MyThread thread; MyDbAdapter adapter; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); try{ adapter = dbInit(); button = (Button)findViewById(R.id.progressDialog); button.setOnClickListener(new OnClickListener(){ public void onClick(View v){ showDialog(PROGRESS_DIALOG); } }); }finally{ adapter.close(); } } protected Dialog onCreateDialog(int id){ switch(id){ case PROGRESS_DIALOG: progressDialog = new ProgressDialog(ProgressBarSample.this); progressDialog.setMessage("loading message..."); thread = new MyThread(handler); thread.start(); return progressDialog; default: return null; } } private MyDbAdapter dbInit(){ adapter = new MyDbAdapter(this); adapter.open(); adapter.deleteMyTable(); adapter.createMyTable(); return adapter; } final Handler handler = new Handler(){ public void handleMessage(Message msg){ int status = msg.getData().getInt("status"); if (status >= 0){ progressDialog.setMessage("Downloading data part2..."); dismissDialog(PROGRESS_DIALOG); } } }; public class MyThread extends Thread{ private Handler myHandler; int downloadStatus; final String dUrl = MY_XML_URL; public MyThread(Handler handler){ this.myHandler = handler; downloadStatus = -1; } public void run(){ Message msg = myHandler.obtainMessage(); Bundle b = new Bundle(); downloadStatus = downloadTables(dUrl); b.putInt("status", downloadStatus); msg.setData(b); myHandler.sendMessage(msg); } public int downloadTables(String xmlUrl){ int downloadStatus = 0; try{ URL url = new URL(xmlUrl); SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser parser = factory.newSAXParser(); XMLReader reader = parser.getXMLReader(); MyHandler handler = new MyHandler(adapter); reader.setContentHandler(handler); reader.parse(new InputSource(url.openStream())); }catch(Exception e){ Log.e("Error: ", "" + e.getMessage()); System.exit(0); }finally{ downloadStatus = 1; } return downloadStatus; } } }