Determine if context is a Specific Activity
You can use instanceof:
if ( this.ActivityContext instanceof MyActivity ) {
/// ....
}
I know the question is in java but if you are looking the answer in the kotlin :
if (this.activity is AppActivity) {
// ...
}