为什么在华为P30 EMUI 12中找不到McurrentFocus或MfocusedApp?
我正在尝试使用下面的代码获取当前屏幕,但是我无法获得手机当前屏幕。
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想在这个问题上分享我的最终发现。衷心希望这可以帮助那些未来面临同样问题的人。
如果您想查看设备的所有活动,则可以尝试以下代码:
以下是可以帮助您找到当前屏幕活动的代码,主要主题是
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:
Here is the code that might help you to find the current screen activity, the main subject is
mLastResumedActivity