Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Ads not loading on non-Huawei device #503

Open
ArsalanRizwan opened this issue Jul 12, 2024 · 9 comments
Open

Issue with Ads not loading on non-Huawei device #503

ArsalanRizwan opened this issue Jul 12, 2024 · 9 comments
Assignees
Labels
investigating We are investigating the current problem

Comments

@ArsalanRizwan
Copy link

ArsalanRizwan commented Jul 12, 2024

Describe the bug & problem
I have a game made in Unity version 2020.3.40f1. I have integrated petal ads in my game using the latest HMS Unity Plugin Version V2.3.8. I have released the game on app gallery. There is a splash ad when game launches. A banner ad that loads and stay at bottom of screen and an interstitial ad that shows up on certain button clicks. I have Samsung A02s (Android 12). Before releasing the game I tested it with test ads and they all were working perfectly fine on my phone. Then I used my own ad ids and after the app got released I installed it on my phone but the problem is that no ads load and show up on my phone. I have latest app gallery and HMS core installed on my phone. I also tested it on Samsung A34 (Android 14) and it also has the same behavior. Then I tested my game using cloud debugging on Huawei P30 and P40 and on both devices I was able to see the ads being loaded and shown as they should be. I also have an old Huawei Y5 Prime (Android 8.1) device and the ads also load and show up in my game on this device. I would like to know if it is possible to show ads on non-Huawei devices and how would I be able to fix this problem. I have attached a log file from my Samsung A02s device.

Steps to Reproduce:

Step1 : Integrate the HMS Evil Minds Plugin into a Unity project.
Step2 : Implement the Ads functionality as per the documentation.
Step3 : Attempt to load and show ads on non-Huawei device.
Step4 : Observe that no ad loads and show up on non-Huawei device.

Expected behavior
The ads should load and show on non-Huawei devices like for e.g. Samsung A02s, A34 but they only show on Huawei devices.

Environment:

  • Unity Version [2020.3.40f1]
  • HMS Unity Plugin Version [V2.3.8]

Smartphones:

  • Devices: Samsung A02s(Android 12), Samsung A34(Android 14)
    log.txt

Thank you for your help.

Copy link

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? ✨

@Andronovo-bit
Copy link
Collaborator

Andronovo-bit commented Jul 12, 2024

@Andronovo-bit Andronovo-bit added the investigating We are investigating the current problem label Jul 12, 2024
@Aziz-T
Copy link
Collaborator

Aziz-T commented Jul 12, 2024

Hi @ArsalanRizwan,

When I examine the log file, I see that there is more than one error code. These error codes are error code 204, error code 700, error code 499.

The common meaning of these error codes is that Ads Kit cannot obtain your exact country code from your device. Since Ads Kit cannot obtain the country code, no suitable ads can be found on the server and a 204 error occurs. Error code 204 is due to no ad matching your request. When the requested ad configuration does not match any existing ad specifications or target conditions, the SDK returns error 204. I will give you the following suggestions to solve the error:

  1. If there is no SIM Card in the phones, try tracking the SIM Cards in the phones. Sim Card may be required to determine the country code.

  2. Set your current region on the phone to a region other than China mainland and the US.

  3. Also, if HMS Core is not installed on non-Huawei devices, make sure you are using Ads - Prime SDK.

If you have any further questions, please feel free to ask.

@ArsalanRizwan
Copy link
Author

ArsalanRizwan commented Jul 12, 2024

Hi @Aziz-T,

Thank you for your detailed reply. I have checked and there is working sim card in my phone. And I am from Pakistan and that is my current region.

Since ads donot work in Pakistan region so I have been using a vpn to test the ads on my phone. And I have also double checked latest version of HMS core is also installed on my phone.

As I mentioned earlier I also have an old Huawei Y5 Prime (Android 8.1) device. I have installed my same game from app gallery on it and by using the vpn I am able to get and see the ads in my game. But when I do the same on my Samsung A02s or A34 phones I am not able to get and see ads on these phones.

I am not able to understand why this is happening and why non-Huawei devices are not able to load and show ads that work fine on my other Huawei device. I am also not sure if I have missed something during integration that is causing this problem in non Huawei phones.

Also there is one thing I forgot to mention. I also have non Unity apps made from Android Studio in my Samsung phone that have integrated Petal Ads. And in these apps ads also work perfectly fine when I'm connected to a vpn. So the only problem I'm having is with Unity apps with Petal Ads in non-Huawei phones.

Thank you.

@ArsalanRizwan
Copy link
Author

Hi, @Andronovo-bit, @Aziz-T

I have still not been able to figure out and solve this problem. I would like to know that is there any update regarding the solution of it?

Thank you.

@Aziz-T
Copy link
Collaborator

Aziz-T commented Aug 28, 2024

Hello Developer @ArsalanRizwan ,

We use ads-lite sdk in unity plugin. Ads-lite sdk is a sdk made only for HMS Core devices. Ads-Prime SDK is available for both HMS and non-HMS devices. Can you try it after converting your SDK version to Ads-Prime SDK based on the document below?
adssdk

Document Link: https://evilminddevs.gitbook.io/hms-unity-plugin/kits-and-services-and-features/hms-core/ads-kit/guides-and-references#devices-without-hms-core-installed

@ArsalanRizwan
Copy link
Author

Hi, @Aziz-T,

Thanks for your reply. Yes I have already done this and have converted the SDK version to Ads-Prime SDK but still I am not able to get ads on the non-Huawei devices even if the HMS core is installed on the device.
Ads Prime

@Aziz-T
Copy link
Collaborator

Aziz-T commented Sep 10, 2024

Hi @ArsalanRizwan

Is it possible to provide your application? This may be an issue caused by the Ads Kit rather than the plugin. If your application is published, provide us the link. If you can send the APK, you can send it by uploading it to the drive. We want to test it on our own side and see.

Have a nice day.

@ArsalanRizwan
Copy link
Author

Hi @Aziz-T,

This is the link of my app published on app gallery: https://appgallery.huawei.com/app/C111444797.

This is the link of APK uploaded on drive: https://drive.google.com/file/d/1SqdJXoJxyngHjEXFdLtjc63hU9cHKRSh/view?usp=sharing

If you want I can also share the actual unity project with you too.

Thank you.

@Aziz-T Aziz-T removed the new label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We are investigating the current problem
Projects
None yet
Development

No branches or pull requests

3 participants