I want to send data to one activity from two activities... such as A,B and C when Activity A send data to Activity B also Activity C send data to Activity B how the Activity B know this data coming from A or C for example:
//this Activity A
Intent i=new Intent(this,B.class);
//send data by i such as id
//this Activity C
Intent in=new Intent(this,B.class);
//send data by in Intent such as id
//send data by in Intent such as email
//in activity B
Bundle val =getIntent().getExtras();
if(val!=null)
int id=val.getInt("id");
String s=val.getString("email");
// to show
Toast.makText(Main.this, id, Toast.LENGTH_LONG).show();
Toast.makeText(Main.this, s, Toast.LENGTH_LONG).show();