为什么在华为P30 EMUI 12中找不到McurrentFocus或MfocusedApp?

发布于 2025-02-10 23:36:01 字数 228 浏览 2 评论 0原文

我正在尝试使用下面的代码获取当前屏幕,但是我无法获得手机当前屏幕。

adb dumpsys window windows | findstr mFocusedApp

还是

adb dumpsys window windows | findstr mCurrentFocus  

任何人都可以存在我如何获取当前屏幕?

I am try to using the code below to get the current screen, but I cannot get what is the current screen of my phone.

adb dumpsys window windows | findstr mFocusedApp

or

adb dumpsys window windows | findstr mCurrentFocus  

Anyone can exist me how to get the current screen?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

葬花如无物 2025-02-17 23:36:01

我想在这个问题上分享我的最终发现。衷心希望这可以帮助那些未来面临同样问题的人。

如果您想查看设备的所有活动,则可以尝试以下代码:

adb shell dumpsys activity

以下是可以帮助您找到当前屏幕活动的代码,主要主题是mlastresumedactivity

adb shell dumpsys activity | findstr mLastResumedActivity

I would like to share my final findings on this question. Sincerely hoping this can help those who faced the same problem in the future.

If you want to look through all the activities of your device , you may try the code below:

adb shell dumpsys activity

Here is the code that might help you to find the current screen activity, the main subject is mLastResumedActivity

adb shell dumpsys activity | findstr mLastResumedActivity
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文