Code example for Messenger

0
	} 
 
	public void onClick(View view) {
		Intent intent = new Intent(this, DownloadService.class);
		// Create a new Messenger for the communication back 
		Messenger messenger = new Messenger(handler);
		// TODO put messages into the intent 
		intent.putExtra("MESSENGER", messenger);
		intent.setData(Uri.parse("http://www.vogella.de/index.html"));
		intent.putExtra("urlpath", "http://www.vogella.de/index.html");
		startService(intent);
	} 
 
	public void showToast(View view) {
		Toast.makeText(this, "Still interactive", Toast.LENGTH_SHORT).show();
	} 
}