Issue I came accross with enyo.platform and android 4.4

In my apps, I have been using enyo.platform.android to see if I am running on android. But now in android 4.4, enyo.platform.android is undefined, and the platform is set as androidChrome.

I worked around it by adding
if (enyo.platform.androidChrome) {
                    enyo.platform.android = 4;
                }
Should this be changed in the core to still set android to a version if your on androidChrome?



Comments

  • No, we treat "android" as the platform for the old WebKit-based Android browser, while the newer Chrome-based platform is "androidChrome". Since the browsers have different behavior, we don't consider them the same platform.
  • Ok, makes sense.

    but should there be a platform flag to determine if your in app mode or browser mode?

    If i am try to support multiple versions of android, you would either have to do what i did in my original post, or check for android and androidChrome.
    All the other platforms have just one to check if you were building a cordova app that supported multiple platforms.

  • For Enyo internally, we don't care if you're in the browser or an app container -- we just use that platform check to figure out when we need to do workarounds for platform bugs that can't be detected in other ways. You can just look for the cordova global to tell if you're running with that support package.
Sign In or Register to comment.