华为手机中的Android背景服务如何知道用户是否已更改为“私人空间”?

发布于 2025-02-13 08:47:48 字数 596 浏览 0 评论 0原文

我正在使用华为手机运行背景服务应用程序,我想检测用户何时将某些华为手机具有的私人空间更改为私人空间(请参见 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文