ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
https://capacitorjs.com
MIT License
11.24k stars 955 forks source link

Please add onWindowFocusChanged to the bridge[Feature]: #7413

Open a-poliusov opened 4 weeks ago

a-poliusov commented 4 weeks ago

Description

Please add onWindowFocusChanged to the bridge

Platforms

Request or proposed solution

Hi. I'm unable to exploit onWindowFocusChanged, because there are not callback from the bridge. Please add this. This method is crucial for fullscreen video view.

Alternatives

We don't have any alternatives except modifying MainActivity, which is not possible.

Additional Information

No response

jcesarmobile commented 1 week ago

And what do you want to do with onWindowFocusChanged? call javascript code? call native code from a plugin?

Why do you say modifying MainActivity is not possible?

a-poliusov commented 5 days ago

Android code is generated every time and we don't have it in our repo. Capacitor has the basic dummy project that is created when capacitor is built and we employ this.

I want to call js code from the callback. This is just good to have all the handles to the android activity code.