Telegram WebGL miniapp can't detect application focus or pause on Android

Hello.

I’ve made a WebGL build to test it it Telegram. But problem is, I can’t stop the background music when app is launched from mobile Telegram (Android 11). Everything works fine when I launch it in browser or even from desktop Telegram client. Unity version 2022.3.

How can I detect lost focus etc in mobile client? Apparently, neither OnApplicationFocus nor OnApplicationPause works in that case when I minimize Telegram app.

Thank you.

same issue!

you resolved it yet?

No, I have not.

i resolved it, but have an other difficult :cry:

Can you tell, how have you managed to solve the problem?

lets use jslib to call from js to unity, event visiblty_changed