华为手机中的Android背景服务如何知道用户是否已更改为“私人空间”?
我正在使用华为手机运行背景服务应用程序,我想检测用户何时将某些华为手机具有的私人空间更改为私人空间(请参见 https://consumer.huawei.com/en/support/content/content/en-us15834600/ )。
我已经尝试询问OS的已安装应用程序数获取正确的私人空间中安装应用程序的正确列表,但是我的背景服务“属于”“普通空间”获取“普通空间”的已安装应用程序列表)。
我还检查了 https://developer.huawei.com/consumer.com/consumer/consumer/en/doc/开发,但我无法找到解决方案。有人知道该怎么做吗?
非常感谢
I am running a background service app in a Huawei mobile phone, and I would like to detect when the user changes into the private space that some Huawei mobile phones have (see https://consumer.huawei.com/en/support/content/en-us15834600/).
I have tried asking the OS for the number of installed applications since in the private space the installed apps are different, but that call returns the same number of applications as in the “ordinary space” (an app running from the beginning in the private space gets the right list of installed applications in the private space but my background service, since it “belongs” to the “ordinary space” gets the list of installed apps of the “ordinary space”).
I have also checked https://developer.huawei.com/consumer/en/doc/development but I am not capable of finding a solution. Does anyone know how to do it?
Many thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论