Huawei game buoy does not display or displays abnormally

Problem background

Recently, the project team has docked with Huawei’s game SDK and has integrated buoy-related interfaces according to official documents .

During the packaging test, the buoy has not been displayed normally on the mobile phone.

Plant grass Huawei online bill of lading address

Because I am really unfamiliar with the Huawei SDK, I checked the code several times according to the documentation, and indeed no code problems were found, so I finally submitted an inquiry form to Huawei HMS Core game service online through the following address: https://developer.huawei .com/consumer/cn/support/feedback/ #/

Problem analysis & buoy self-test

According to the answer given by the official technical support, Huawei Game Buoy has two solutions, which are also explained in the document :

Insert picture description here

  • Huawei mobile phones EMUI9.1.1 and above, do not require developers to integrate code, Huawei automatically controls the buoy display.
  • For Huawei mobile phones below EMUI 9.1.1, you need to follow the above document link to integrate the code.

Because there are many mobile phone models of actual users on the live network, it is impossible to be higher than the EMUI9.1.1 version, so code integration is still necessary.

Since there are two sets of buoy schemes, how to self-check that the buoy has been functionally OK?

  • Whether the detection code integration of Huawei EMUI9.1.1 or below is normal:
    1. Find a mobile phone with Huawei EMUI 9.1.1 or lower to test the buoy function. If the following buoy is displayed, it indicates that the function is normal.

Insert picture description here

  1. If it cannot be displayed normally, check the following key points (knock on the blackboard, key points!):
checking point Description
Game initialization interface check The buoy interface needs to be called after the SDK initializes init
Buoy interface call timing check Call the display buoy interface in the onResume method of all game interfaces, and call the buoy hide interface in onPause. Refer to the documentation for details.
Buoy interface call logic The same game interface must have called the showFloatWindow interface to display the buoy before calling the buoy hidden interface hideFloatWindow to hide the buoy
Check the Huawei App Market version number of the test machine The application market version number is not less than 9.0
  • For mobile phones with Huawei EMUI9.1.1 and above, Huawei mobile phones will automatically display the game buoy and ignore the request of this interface. If you want to see the effect, you need to add the application to the game space through "Settings-Application-Application Assistant-Game Space" (I didn't show it because I didn't add this step). Finally, there is the following buoy in the upper left corner of the phone:

Insert picture description here


Original link:https://developer.huawei.com/consumer/cn/forum/topic/0204399583447760128?fid=18

Author: AppGallery Connect

Guess you like

Origin blog.51cto.com/14772288/2551458