How can I get the name of the current activity in the base class. Suppose I have a base activity class BaseActivity :
class BaseActivity extends AppCompatActivity
{
...
String getCurrentActivityName() {
....
}
...
}
Now I have 2 other classes
class Activity1 extends BaseActivity
{
....
}
class Activity2 extends BaseActivity
{
....
}
There maybe many more activities extending BaseActivity, for brevity I have used 2 here.
I am not sure how to implement getCurrentActivityName() method in the base class. It should return a String containing the name of the current activity.
EDIT : For some reasons I cannot edit Activity1 and Activity2.