So, i know there's lot of examples with Viewtext and EditText, but i'm struggle with if-else, i have Activity A :
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
if(Long.parseLong(IMEI) == IMEI2){
IMEI .equals(IMEI2);
textView.setText("IMEI NUMBER : " + IMEI);
Intent intent = new Intent(imei.this, menu_utama.class);
}else{
AlertDialog.Builder builder = new AlertDialog.Builder(imei.this);
builder.setMessage("Data IMEI and IMEI2 did not match")
.setNegativeButton("Retry", null)
.create()
.show();
}
}
});
now i want to use : if(Long.parseLong(IMEI) == IMEI2)
= success
i want to use it in Activity B in an if(that condition in Activity A success){do something}else{}
condition too. How i do this ?