[英]How to change a device's screen orientation from service in android?
Is it possible to change the device's orientation from portrait to landscape from a running service? 是否可以通过运行的服务将设备的方向从纵向更改为横向? I have searched but I couldn't find anything negative or positive
我已经搜索过,但找不到任何负面或正面的信息
A service is a background operation while the orientation of the screen is a UI operation. 服务是后台操作,而屏幕的方向是UI操作。 You could force a service to launch an activity (but that's not recommended at all) and setting it in your manifest as in landscape orientation.
您可以强制服务启动活动(但是完全不建议这样做),并将其设置在清单中(如横向)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.