Is There Any Way To Get Root View Of An Activity From A Service?
I am working on an app in which I have to get all the views of the top most activity. This activity may or may not be of my app. I am able to get all the views from a ViewGroup(roo
Solution 1:
I am working on an app in which I have to get all the views of the top most activity. This activity may or may not be of my app.
Fortunately, this is not possible, for blindingly obvious privacy and security reasons.
It's also not possible from a simple programming standpoint, as the views in whatever you think "the top most activity" is are from another process. You cannot have an object from another process in yours, by definition.
Post a Comment for "Is There Any Way To Get Root View Of An Activity From A Service?"