I have one activity which can be open from more 4 or 5 different activity so i can find from which activity my current activity is called...
If any idea please help me..
You might want to add extras to the intent you use to start the activity to indicate where the intent is coming from or what the request is.
Intent intent = new Intent(this, OtherActivity.class); intent.putExtra("caller", "MainActivity"); startActivity(intent);
and then your
OtherActivity could detect the "caller" in its
String caller = getIntent().getStringExtra("caller"); Class callerClass = Class.forName(caller);