I often find myself needing to access methods that require referencing some activity. For example, to use getWindowManager, I need to access some Activity. But ofte
getWindowManager
If you already have a valid context, just use this: Activity activity = (Activity) context;
Activity activity = (Activity) context;