I have a service and I want to get context of topmost activity which is currently running on foreground. The service is in my own app and topmost activity is from another app (the activity is not from my app). Is it possible ? If yes, how?
Edit : I need to get context because, I want to apply custom distortion to images rendered by Google VR service. How I plan to do is:
- Get context of GvrActivity in my service.
- Get GvrView from the context
- Access
onDrawFrame()
methods etc. from GvrView and apply custom distortion