Material: Support of Android 4.1, 4.2 and 4.3 (Jelly Bean)

Created on 24 Nov 2015  路  10Comments  路  Source: angular/material

Hello,

I'm building an application under Phonegap using Angular Material. Everything OK .. except on Jelly Bean.

I read multiple time that your target is Android 4.4+ but as Jelly Bean still represent 29% of Android User (see screenshot of: http://developer.android.com/about/dashboards/index.html) you should maybe give a bit of support on it...

image

Do you know some of the reason why android 4.1 to 4.3 is broken? Is it related to flex-box support? Maybe there is some CSS tricks to have a less broken interface?

Thanks for your help!

Most helpful comment

Here's I finnally did:

  • I create two applications on PGB (phonegap build) one for android JellyBean with CrossWalk and an other for SDK 19+ (Kitkat+)
  • Use the "Multiple APK feature on Google play (http://developer.android.com/google/play/publishing/multiple-apks.html) so the players automaticly download the right APK for his device

Result:
KitKat+: 15Mo
JellyBean: 50Mo

If this can help someone :)

All 10 comments

I'm building an application under Phonegap using Angular Material. Everything OK .. except on Jelly Bean.
Do you know some of the reason why android 4.1 to 4.3 is broken? Is it related to flex-box support? Maybe there is some CSS tricks to have a less broken interface?

Among many bugs in those webviews, yeah flexbox support is pretty important. What I ended up opting for (and this won't work for everyone) is using the crosswalk project. With Cordova 4+ you can install it as a plugin. Note that it will make your generated apk much, much larger.

Crosswalk project is not a acceptable solution for me because:

  • Increased memory footprint ~30MB
  • Increased APK size (about 17MB) => My app will prompt a popup "App > 50MB use wifi to dowload"
  • Increased size on disk when installed (about 50MB)
  • Phonegap/webview which is known to be heavy too...

=> bye bye performances :(

It can be very usefull to have a detailled list of what CSS (if it's only CSS) properties not supported by old webviews.It will probably possible to find some solutions and get a degraded mode for old Android...

@CyrilleGuimezanes check Crosswalk lite.

=> bye bye performances :(

This depends on the metric. I could see startup time taking longer, but CSS animations and Javascript perform noticeably faster with Crosswalk (at least on my old as dirt test device)

I am against putting any effort towards angular material compatibility with older Android web views. I believe that if someone is running a device so crappy that Crosswalk (which is just a browser) won't even run smoothly on it, they should not expect any decent app to run on it either. There are enough issues to fix with the existing framework as it is. The older Webviews are absolutely terrible at CSS support as well as performance, and should be avoided.

The real question is, why are you trying to target such crappy devices? What kind of value do you expect to actually get from those people, who are probably not going to be using them for apps to begin with?

@GustavoCostaW I will check this. The integration into Phonegap build seems to be in progress
@mckenzielong interesting, I will check this.

@jpike88 We are talking phone that use a Jelly Bean relased on 2013 octobrer 31th ... 1120 days! Ok it's a long long time in computer world....
If we compare to the old 2.x version, Jelly Bean will be activily in use for 3 to 5 years ... a long long time in computer world.

We're producing games on mobile devices, for us, a player is a player we don't care about his android version. If you take in consideration that only around 5 to 10% of your user will pay someting on your application... you can't ignore 30% of your audience.
Keep in mind that many user does not need the last Galaxy S6 or Nexus6 with the last version of Android every year...

Here's I finnally did:

  • I create two applications on PGB (phonegap build) one for android JellyBean with CrossWalk and an other for SDK 19+ (Kitkat+)
  • Use the "Multiple APK feature on Google play (http://developer.android.com/google/play/publishing/multiple-apks.html) so the players automaticly download the right APK for his device

Result:
KitKat+: 15Mo
JellyBean: 50Mo

If this can help someone :)

@CyrilleGuimezanes reminder you, The Android team separate web view in system from API MIN 21(lollipop) and not 19 (KitKat continues using WebView together with OS).

You can create two apks:

1藲 - API MinSDK 21 (without crosswalk), Android 5.0 >= Webview here is updated separate from OS
2藲 - API MinSDK 14 (with crosswalk), Android <= 4.4 = WebView here is together with OS

Configure this in Cordova config.xml

@GustavoCostaW Thanks for these informations :)

Well, I have to re-test but I think Angular Material works well on Android 4.4. As this version represent today 36% of the android users I think they have to get the 15Mo APK even if the webview is separated or not from OS.

gt-n8190i

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robertmesserle picture robertmesserle  路  3Comments

ghost picture ghost  路  3Comments

buzybee83 picture buzybee83  路  3Comments

PeerInfinity picture PeerInfinity  路  3Comments

pablorsk picture pablorsk  路  3Comments