I want to set screen orientation dynamically using a service that checks whether some requirements are met. If it's met it changes orientation to portrait or landscape dynamically. I don't want to use activity. There is already one post related to my question but the solution uses LinearLayout which returns always null in the service context. The link to the post: How can I globally force screen orientation in Android?
Do you have any suggestion how can I implement something like that?