When i am in an Activity say Activity_A, i go to a class_B using the context of Activity_A.
Now when i want to restart the Activity_A from the class_B. I use this
Intent intent = new Intent(context, Activity_A.class);
context.startActivity(intent);
what i want is when i am calling the class_B from various Activities, it must restart the Activity it is called from, using the context which is sent to the class_B from the Activity.
i want to replace Activity_A.class with the Activity which called class_B
In your case you shoud pass a class variable togethe with Context of activity.
e.g. from Actitity_A:
And use class variable for start Activity from class_B