I am working on a project that is supposed to show a small presentation on an additional display (API 4.2). So far, everything is working fine. But if I close the application, I cannot prevent the presentation from closing. I would like to create an application that launches a background service that initializes the presentation. So that the user simply sees the notification icon in the status bar, but the service transfers the streaming content to the secondary display.
Any ideas if this can be implemented? I tried this with backgroundservice but don't know which context should I use. Tried this with
getApplicationContext()
but then I get an exception:
Unable to add window -- token null is not for an application
If I use a static method like getAppContext() (I know such an ugly hack), it will show the presentation, but also hide it if I close the application.
Any ideas?
android service presentation
mkl
source share