How to distinguish if given Context object is an Activity or a Service Context?
<p>I would like to know if my given Context object is from Activity, Service or Application. Or in other words if my code is executing in background or in foreground. (By foreground i mean Activity code and threads that have been created by Activity.)</p>
