The Android Support library, a look at its pros and cons - $

Saturday, November 23, 2019

The Android Support library, a look at its pros and cons


 Reaching a good audience is one in all the primary things associate humanoid Developer learns, the blokes at humanoid offer North American country some nice tools, as an example the humanoid Support library to assist with this, but, Is it invariably the simplest selection for our App?



Anyone United Nations agency has developed humanoid Apps is conversant in this problem: you simply accessorial Fragments to your App, you’re doing nice, however suddenly your App keeps throwing errors, you check the code, and zip you are trying to wash the project, and zip, it’s solely till you opt to ascertain the imports section, that you just find out, you’re victimisation 2 completely different Fragment categories, one is from the traditional humanoid library and therefore the alternative is from the humanoid support library, however why will this happen? Why square measure there 2 completely different libraries? Let’s take a glance at the humanoid support library.

First things 1st, as you may infer from the name the humanoid support library is supposed to be used once you’re targeting older devices, it helps, bring newer options to older humanoid versions, therefore it supports the devices.

It accomplishes this by making new categories, interfaces and functions that adjust to the specifications of the older humanoid genus Apis, this makes it doable to use the newest options in older devices. Of course, it’s not while not its issues, this library is incompatible with the quality library, which means that, whereas you'll be able to combine and match functions, having many implementations of an equivalent library is absolute to cause issues, just like the one we tend to delineate within the starting. The support library has gone and evolved aboard humanoid, and it keeps evolving.

If you continue to haven’t done thus, the humanoid team even includes a Youtube channel, and here’s a listing showing several of the attention-grabbing and helpful options of the humanoid support library. However, having a glance at the listing, you may notice it’s a small amount obsolete, last updated in 2018!

Why? bear in mind we tend to aforementioned the support library is evolving aboard Android? Well that’s still true! The support library is currently called AndroidX, that is an element of a much bigger library called Jetpack, that comes with its own neat options and perks.

AndroidX conjointly marks another issue, it’s a move from Java to Kotlin because the official humanoid language, and whereas Java continues to be supported, as way as we all know, moving forward, everything humanoid announces are shown in Kotlin, thus it would be an honest plan to select up Kotlin, at least, look into the playground and therefore the docs, to induce a feel of the language, thus you don’t need to go around searching for Java explanations

Now let’s cite the benefits and downsides of victimisation support libraries

First, the benefits, the largest one is sort of obvious, having the ability to support a much bigger market of devices, suggests that our apps have a more robust probability of aiming to a client, and obtaining larger. As several developers grasp supporting additional devices suggests that additional market share, additional market share suggests that additional downloads, and additional downloads mean additional revenue.

The disadvantages don't seem to be as clear cut, however there square measure quite few to notice. Specially if you’re employing a support library it suggests that you can’t use the newest functions, humanoid twenty eight (Pie) is presently the newest discharged version, and therefore the oldest version that the v4 library supports is, unsurprisingly, Android 4, taking a glance at the discharge schedules, humanoid four was discharged in 2009, that’s ten years as of now! which means that regardless of the library will it's to run on a ten year previous phone.

Here could be a quote from associate  article, from the blokes at MartianCraft, that helps place things in perspective
Furthermore, in some cases, developers might imagine they need the selection between framework and support implementations of a selected feature, solely to seek out out that support dependencies dictate that call for them. as an example, the v7-appcompat library permits developers to use Material style UI options introduced in API twenty one. However, doing thus needs that each one activities extend from AppCompatActivity, that extends from the v4 support FragmentActivity. So, developers targeting something but API twenty one and desire to use Material style UI options square measure forced to use v4 support Fragments, instead of framework Fragments.

All in all, the support library cones with some superb options, and, in most cases, it’s a no brainer to use it. That’s it, if your objective is to succeed in a good audience, fosse of the new options don't seem to be on the market at launch within the support library, and in some cases it’s ne'er on the market. If your objective is innovation, then you may wish to forgo backwards compatibility and go tired with the newest version. Speaking of that, you may wish to allow the humanoid Studio Canary channel a glance, it’s wherever the new, experimental options go live.

No comments:
Write Comments
Recommended Posts × +