Hi,
We have a setup where we redirect to remote web pages as our ionic app. But Capacitor.isNativePlatform is false on those pages. It is expectedly true on the initial page, an “index.html environment” in the original repository.
The setup is roughly like that:
Repository 1:
- App starting point, local index.html
- Packages: Capacitor Core, App, Android
Redirects to:
Repository 2:
- Other parts of the app which are deployed on another remote URL
- Packages: Capacitor Core, App, Android
I am testing on an android device via Android Studio.
Specifically, I want to access the resume event of the App Plugin but I get the warning implementation unavailable for: App. It is possible to listen to the Cordova resume event on document, though, but that sounds kinda outdated.
Any ideas how get the native platform correctly recognized? I tried setting window.CapacitorCustomPlatform = "android" early on the remote location. That didn’t help.
Is there a way to manually provide conditions for “nativePlatform” on android? Or does anyone have another idea?
thanks!