If I have a reference to Context, is it possible to finish the current activity?
Context
I don\'t have the reference to current activity.
I know it's an old post but, perhaps it could be a good idea to call it this way:
if(context instanceof Activity){ ((Activity)context).finish(); }
This way we make sure we don't get any unnecesary ClassCastExceptions