Code example for Messenger

0
	public static final String URLPATH = "urlPath";
	public static final String RESULTPATH = "urlPath";
	private int result = Activity.RESULT_CANCELED;
 
	// Used to receive messages from the Activity 
	final Messenger inMessenger = new Messenger(new IncomingHandler());
	// Use to send message to the Activity 
	private Messenger outMessenger;
 
	public DownloadServiceMessenger() { 
		super(); 
		// Don't do this 
		// Network Stuff will run in the main thread 
		StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()
				.permitAll().build();
		StrictMode.setThreadPolicy(policy);
	} 
 
	class IncomingHandler extends Handler {
		@Override 
Stop searching for code, let great code find you!  Add Codota to your java IDE