I want to show a view on calling a Service API. Currently the only way
looks like using the Toast class.

I tried the following after getting the WindowManager service, but it
crashes at addView. I looked into the Toast class and found that it
uses WindowManagerImpl which is not accessible publicly - is there any
way to access the WindowManagerImpl functionality?

public void myServiceAPI() throws RemoteException {
        ImageView i = new ImageView(MyService.this);
        i.setImageResource(R.drawable.sample_icon);
        WindowManager wm = (WindowManager)
MyService.this.getSystemService(Context.WINDOW_SERVICE);
        WindowManager.LayoutParams lp = new WindowManager.LayoutParams
(100, 100, 10, 10, 0,  0, 0 );
        wm.addView(i, lp); // crashes here

-George
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to