I have the ComponentName of a foreground screen activity. I am able to get the context object from the same. But I need the activity instance. How can I get the activity reference from the ComponentName. All this code will be written in a service.

Thanks in advance.

Edit
Report