tags:

views:

64

answers:

1

there are 2 activity A and Screen in A Activity , i made handler and want to pass it to screen activity

Handler error_handler = new Handler() {
public void handleMessage(Message msg) {
}};

Intent loginButton_intent = new Intent(A.this, Screen.class);
loginButton_intent.putExtra("URL", URL);
loginButton_intent.putExtra("IP_Addres", dvr_login_data.IP_Addres);
loginButton_intent.("HAND", error_handler); <- but this code is error 

how can i pass handler ? plz warm-answer

A: 

Well, to keep it short, you can't...Handler implements neithor Serializable nor Parcelable so it cannot be put as an extra...The Object Transported using Intents must follow eithor of those protocols.

Speculation I suppose, there's an alternative that would involve creating a Service to act as a middle man. But that'll require some testing.

st0le
thanks your answer
n2v2rda2