Forum Replies Created
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!
I’ll keep you informed, but it will be after christmas holidays.
I could try to take a look, thank you.
OnApplicationPause(true)is called when the browser is closed.
- This reply was modified 2 years, 1 month ago by Tethip.
It 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.
Here some more details where you can see some logs. (blurred part are useless and/or confidential)
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.
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.
I understrand this will be a tricky one.
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.
It worked perfectly for
I couldn’t test all color change, I don’t have time, but I guess you fixed it all. 😉
Thanks for quick fix.
I’ll test it tomorrow morning and let you know.