EvilMindDevs / hms-unity-plugin

The HMS Unity Plugin makes it easy to include Huawei Mobile Services into Unity-based games. Authentication, in-app purchases, push alerts, ads, and interaction with gaming services are just a few of the basic capabilities that this formidable tool makes available to your applications.
https://evilminddevs.gitbook.io/hms-unity-plugin/
311 stars 43 forks source link

App force update #489

Open atheer10 opened 5 months ago

atheer10 commented 5 months ago

Describe the bug & problem

We are trying to force update in our game, we have looked into the documentation , and we have integrated the the update SDK in our game prior. We have released a new version to the store, and we are testing with an older version to see if the pop-up appears but it doesn't. Both versions when released "force update" button on the Huawei AppGallery was turned on, our understanding is there's no additional calls required or steps aside from the integration and store check.

When we visit the store, we can see that an update is available. When the auto-update for the store was on, the app updated on it's own, we have turned it off in order to test, but the no results. Currently, we do not see the force update pop-up panel or any indicator that the update sdk is working.

We have provided screenshots of the code, Can you please guide us to any missing steps ?

Expected behavior A new version is available pop-up shows up when the game is booted.

Screenshots & Detailed log If applicable, add screenshots and a Log to help explain your problem.

image (2)

update_huawei_3 update_huawei_2 update_huawei_1 update_huawei update_huawei_4

Environment (please complete the following information):

Smartphone (please complete the following information):

Additional context

github-actions[bot] commented 5 months ago

Thank you for reporting this issue/advice.

We will get back to you as soon as possible.
Would you like to star our plugin to support us? :sparkles:

Andronovo-bit commented 5 months ago

Hi @atheer10 . We are under review. If you want, you can try the suggestions below until this process is complete.

K2xjw8o87t

atheer10 commented 5 months ago

@Andronovo-bit

atheer10 commented 4 months ago

@Andronovo-bit We have created a new build with the fix above of changing the CheckAppUpdate values to true and installed it on the device, then uploaded another newer version to the store, we can see from the store/notification that there's an update available, however nothing shows up within the app to prompt an update.

Andronovo-bit commented 4 months ago

@atheer10 Ok I understood. I should have asked before. Did you activate the game service on AppGallery panel ? And also, did you enable gamekit in unity-plugin? Like the below images.

image

image

image

Do you mind if can you send a game url or apk for review?

atheer10 commented 4 months ago

@Andronovo-bit Looks like those settings were off ! I will make a new build and share it This is the URL of the game : https://appgallery.huawei.com/app/C105911883

Andronovo-bit commented 4 months ago

I tried to download this app, but I couldn't see it in the gallery. Is released this app or can we accessable in Turkey ? I guess this game don't available in my region.

atheer10 commented 4 months ago

@Andronovo-bit

Andronovo-bit commented 4 months ago

@atheer10

atheer10 commented 4 months ago

@Andronovo-bit

Andronovo-bit commented 4 months ago

@atheer10

Hi, thank you for opening your game in Turkey. We checked the game with logs, but we didn't see any "game service and update function triggered" logs. You should enable game service and use HMSGameServiceManager for force updating.

For instance;

If you want to use it in a starting scene, you can add the below code.

HMSGameServiceManager.Instance.InitGameManagers()
HMSGameServiceManager.Instance.CheckAppUpdate(true,true)

OR

If you already use HMSGameServiceManager in your scene, you can change the InitGameManager's function's body like below.


 public void InitGameManagers()
     {
             ...
             ...
            CheckAppUpdate(true, true);
      }

After calling this function, you will be automatically callback to the 'OnUpdateInfo' methods in HMSGameService and the Update Dialogue will be opened in your game.

atheer10 commented 3 months ago

@Andronovo-bit

image image

Andronovo-bit commented 3 months ago
atheer10 commented 3 months ago

@Andronovo-bit We have a newer release with those implemented, and we still don’t see the update prompt. Do you mind looking at the logs to see why ?

Andronovo-bit commented 3 months ago

@atheer10 Hello again,

We checked it but we didn't find any game service log record in Logcat.

For example, we able to see IAP kit log records like this;

image

But we can't see any game service log record like this;

image

You didn't enable or initialize the game service kit in your project start, as we can see.

You should trigger game service kit during game starting.

atheer10 commented 2 months ago

@Andronovo-bit Can you please check if it's still the case in the newest build ?

Andronovo-bit commented 2 months ago

@atheer10 We didn't see any log again after installed latest version your game.

Can you check below steps in images ? Maybe there is a step you missed or didn't do.

1-) Activate Game Service in Huawei Plugin

image

2-) Enable "Initiliaze On Start" in Game Service Tab

image

3-) You should add game service script that you wrote to object in your loading or opening game scene.

image

4-) After all things , you should be able to see "HMS GAMES" in your log.

image