On Sep 4, 3:51 am, HK <[email protected]> wrote:
> HI,
>
> (I had posted this question in platform, but didn't get any response, so
> posting here)
>
> I want to display TYPE_SYSTEM_DIALOG from a service:
> snapshot of code:
> popup.getWindow().setType(
> WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG);
> popup.show();
>
> Basically I am finding a way to display dialog without an activity. I found
> that TYPE_SYSTEM_DIALOG could be a way. But the dialog doesn't show up and
> there is no error. The same code with normal dialog using an activity shows
> up, but not system dialog from service.
> My service can be a system service(system app).
> So my question is:
> - what permissions do I need to set ?
> - is there anything else I need to do ? or call ?
> - anything i would be missing which is needed for TYPE_SYSTEM_DIALOG
>
> thank you.

as Pent said you are on the wrong path: this is not the way you should
follow

yes i managed to do what you are trying to do with
setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT) together with
permission:

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/
>

and it works on my emulator but may NOT work on the real device and
again this is not the way you should go

pskink

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