Code example for Message

Methods: getData

0
import android.widget.Toast; 
 
public class MainActivity extends Activity {
	private Handler handler = new Handler() {
		public void handleMessage(Message message) { 
			Bundle data = message.getData(); 
			if (message.arg1 == RESULT_OK && data != null) { 
 
				String path = data.getString("absolutePath"); 
				Toast.makeText(MainActivity.this, "Downloaded" + path, 
						Toast.LENGTH_LONG).show(); 
			} else { 
				Toast.makeText(MainActivity.this, "Download failed.", 
						Toast.LENGTH_LONG).show(); 
			} 
 
		}; 
	}; 
 
	@Override 
	public void onCreate(Bundle savedInstanceState) {