游戏中浮动Window显示不正常怎么办?

What Can I Do When the Floating Window Is Not Displayed Normally in My Game?

"最近,我的团队根据官方文档,在他们的应用程序中集成了与浮动相关的游戏服务SDK和API window。

但是当他们打包和运行应用程序时,浮动window没有正常显示。 我该如何解决?"

The official documentation如何集成浮动window功能说明:

  • 华为设备运行EMUI9.1.1及以上版本,无需集成任何SDK,游戏漂浮window自动显示.

  • 9.1.1之前的华为设备运行EMUI需要按照前面[=68]处的说明集成浮动window功能=].

  1. 如果显示如下浮动window,则集成成功

  2. 如果无法显示浮动window,请根据以下项目进行检查。

  • 游戏初始化API:initAPI必须先调用API游戏相关的浮动window.
  • Calls of APIs related to floating window:在onResume方法中调用showFloatWindow API,调用hideFloatWindow API 在 onPause 方法中。详情请参考官方文档
  • 浮动调用逻辑window API:hideFloatWindow API只有在showFloatWindow API被调用后才能调用调用以在游戏 UI.
  • 上显示游戏浮动 window
  • 测试设备华为应用市场版本号:应用市场版本必须为9.0及以上

详情请参考:What Can I Do When the Floating Window Is Not Displayed Normally in My Game?