On Tue, Jun 28, 2011 at 11:17 PM, PKS <[email protected]> wrote: > I am new to android. > I created a service. > From my service, I can able to get which application is running in > foreground. > I am doing this with the help of > ActivityManager.getRunningAppProcesses(). > From this I can able to get the Activity's PID, PkgList, Process name, > UID. > But I don't know how to get the view instance of that activity. > From this Activity's parameter how to get the foreground activity's > view instance?
You cannot do this. Not only would it be a security nightmare, but the other application is running in another process, so you do not have access to its objects. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in Oslo: http://bit.ly/fjBo24 -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

