I need to use the following line in service class
getWindow().getDecorView().setSystemUiVisibility(8);
Please anyone help.
I need to use the following line in service class
getWindow().getDecorView().setSystemUiVisibility(8);
Please anyone help.
A service can not set window properties, since it has no view/UI. You must send an event to your activity, which must set this property. When it comes to sending the event to activity, you can use several mechanisms:
Intent
from your Service
class, let your Activity
listen for that broadcast, and set the action on UI thread