Automatically set context using top activity