Forum Replies Created
-
AuthorPosts
-
TethipParticipant
Hi Piotr,
Sorry for the long time without answser, many other projects to work on.
I just tried the file with an old LG G3 running Android 5.0, with a basic app build with unity 2020.2.1f1.
I had no OnApplicationPause problem when i go back to the app after pausing (I tried many ways to pause and go back for 5 minutes).
Without this file, the bug was still here.It looks like its working!
Thanks!
TethipParticipantGot it.
I’ll keep you informed, but it will be after christmas holidays.
Thanks!
TethipParticipantI could try to take a look, thank you.
TethipParticipantup
OnApplicationPause(true)
is called when the browser is closed.- This reply was modified 4 years, 4 months ago by Tethip.
TethipParticipantIt won’t work, because Unity don’t get any callbacks while it’s paused.
I found a poor but working solution.
I close the in app browser just before an in app purchase or a share action that put the application on pause. When the purchase or the share is done, I reopen the browser at the last url.But this solution doesn’t work with the pause started with the home or overview buttons. The applications crashes in these cases.
TethipParticipantHi,
Here some more details where you can see some logs. (blurred part are useless and/or confidential)
https://www.dropbox.com/s/hgyvqoybuqvuf1m/PbAndroidPause.jpg?dl=0
It happen too when i’m sharing something with the native android API.
In other words, when somthing shows up top of my app, Unity’s pause is called, but when I go back to my app, if the in app browser is still open, the end of the pause is never detected by unity.
(so like I wrote before, no callbacks, no updates, no javascript messages)By the way, when the browser is running, Unity considers the focus always lost for the app. Not a problem for me, but could be for others.
Thank you
TethipParticipantI understrand this will be a tricky one.
Unity doesn’t catch events when it’s paused. Not even javascript messages from the browser.
So when my app resume after the purchase (but still on pause == true), I can’t do anything except naviguate the web trough the browser.
The only solution I found is to close the browser, and only then, OnApplicationPause(false) is sent by Unity. But I Have to do it manualy, because I can’t detect any event to do it automaticly. Not very user friendly.
TethipParticipantIt worked perfectly for
options.loadingIndicatorColor
.I couldn’t test all color change, I don’t have time, but I guess you fixed it all. 😉
Thanks again!
TethipParticipantYou’re welcome!
Thanks for quick fix.
I’ll test it tomorrow morning and let you know.
TethipParticipantYes, it’s called automatically when the app is paused/unpaused, by the OS for instance.
Here’s more : Unity3D OnApplicationPause documentation
-
AuthorPosts