cordova.platformId returning "browser" on android #493
Replies: 1 comment
-
So the fact that Also worth making sure you're correctly testing the variable rather than doing an assignment. For example: if (cordova.platformId = "browser") { ... } A logical error such as above which might be easy to miss, would do an assignment, replacing The following would be the correct usage: if (cordova.platformId === "browser") { ... } |
Beta Was this translation helpful? Give feedback.
-
I'm trying to write some mobile specific code in my cordova android app. My content src is an index.html where I have my JS code.
When I check cordova.platformId, it returns "browser", even if running on Android. Using cordova 12.0.0.
Beta Was this translation helpful? Give feedback.
All reactions