Scirra / Construct-bugs

Public bug report submissions for Construct 3 and Construct Animate. Please read the guidelines then click the 'Issues' tab to get started.
https://www.construct.net
107 stars 83 forks source link

Black screen problem in Android apk after adding MobileAdvert plug-in #6591

Closed ZiWang-Li closed 1 year ago

ZiWang-Li commented 1 year ago

Problem description

When I added the MobileAdvert plug-in to the project and exported to Android apk, a black screen (about 10 seconds) would appear when the apk was opened on the mobile phone, and then finally the game content appeared. Is there a way to display some pictures or load text when the screen is black?

Attach a .c3p

adsTestProject.android.debug.zip

Steps to reproduce

  1. Create a new project and add the MobileAdvert plug-in
  2. Project export Android platform
  3. Open project on Android phone

Observed result

When I opened the apk on the phone, the apk logo first appeared, then a black screen appeared, and finally after about 10 seconds the game content appeared. The following is the screen recording process of opening the project on the mobile phone.

https://user-images.githubusercontent.com/83768982/220298184-2ea73771-6e48-409b-80de-dc7a0fa116ed.mp4

Expected result

I hope to reduce the black screen time or at least show a "loading" image during the black screen time.

More details

Because I am in China, I have been using a vpn to open the game, so network problems should not be within the scope.

Affected browsers/platforms:

Phone model : FRD-AL10 (Honor8) EMUI version : 8.0.0 Android version : 8.0.0

First affected release:

System details

View details PASTE HERE Google Chrome | 110.0.5481.104 Construct 3 version : r330beta
AshleyScirra commented 1 year ago

I think this is a bug in Mobile Advert, not Construct, where if it fails to initialise then it just hangs. Our workaround is to impose a timeout: it will wait several seconds and if Mobile Advert does not respond in time it continues without ads, otherwise it would just hang forever. The solution is to ensure Mobile Advert is correctly configured - it won't work if you just add it to a project and export with default settings.