Does device support change with AndroidX migration? - android

If I have a published android application that uses the android support libraries, and I then migrate my app to use androidx (making as few changes as possible), does this impact the needed OS on a device in order to run my app?
The AndroidX overview (https://developer.android.com/jetpack/androidx/) states that "AndroidX ships separately from the Android OS and provides backwards-compatibility across Android releases. AndroidX fully replaces the Support Library by providing feature parity and new libraries." but I'm not sure that this answers my question.

AndroidX is designed as replacement for current support libraries. So it has same minimum api level, since version of support library 26.0.0 minimum api level is 14 (Android 4.0).
So if you had support library below 26 version in your project, AndroidX will impact on needed OS, in other case not.

Related

Understanding ability to use AndroidX in old Apps

I would like to use AndroidX if I can (instead of the support library). I read that it is backwards compatible, and people have been using it with API 21. Due to some limitations with one of our vendors... our app is built to only work on Android SDK 5, API 21. When I search for AndroidX packages in the Nuget Package Manager in Visual Studio.. the Dependencies listed are MonoAndroid.Version=v9.0. Does this mean I cannot migrate to AndroidX for my project?
AndroidX can work on API 21. MonoAndroid.Version=v9.0 is not indication of the API level, this is Microsoft's version number that has nothing to do with Google SDK version numbers.
So yes, you can migrate, I have migrated one project that targets API 21.

Are AppCompat frameworks and libraries necessary for new Android projects?

I'm just getting into Android development. I'll be using Xamarin.Android. Reading into this, and having toyed around with Android in the past, are AppCompat frameworks/libraries still necessary? I ask this because it seems that from Nov 1, 2019, all new app submissions require at least API Level 28 as the minimum, so what use would it be to include all these bloated appcompat libraries?
Correct me if I'm wrong or mistaken.
#wpa
AppCompat should not be necessary if you are starting a fresh new project. You can start using AndroidX libraries which will provide backwards compatibility. The requirement being mandated starting Nov 1, 2019 is not for the minimumSdk. It is for the targetSdk version. These are different. You can still have your minimumSdk to the lowest you want, but your app should target at least Android 8.0 (API level 26).
Please follow the link below for detailed information.
https://developer.android.com/distribute/best-practices/develop/target-sdk
Google requires set targetSdkVersion api level in 28 for currently apps in the Google Play Store, but if you are starting a new project, surely will start by default withe the latest android version 29.
Feel free of choose the minSdkVersion in your project.
targetSdkVersion: normally the latest android version available (for example API 29/Android 10)
minSdkVersion: the min Android SDK that your application can run on (for example since 21/ Android Lollipop)
androidx
Other hand, it is still necessary to support previous versions if your plan is to reach the majority of users using new features in old versions of android
However, according to android documentation, developers should be start projects using androidx libraries and not use appcompat library anymore.
Artifacts within the androidx namespace comprise the Android Jetpack libraries. Like the Support Library, libraries in theandroidx namespace ship separately from the Android platform and provide backward compatibility across Android releases.
https://developer.android.com/jetpack/androidx
https://developer.android.com/jetpack/androidx/versions/
https://developer.android.com/jetpack/androidx/migrate (if in the future you find an old project that needs to migrate to androidx libraries)

What is the best way to build Flutter with plugins that support Androidx?

The following link lists the minimum plugin versions that are pre-Androidx
https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility
Androidx requires minimum Android 9.0 (API level 28). This may not be supported across all android devices. What is the best way to build Flutter apps in such cases ? Maintaining two code bases one with and one without Androidx seems to be painful.

What does v7 mean in <android.support.v7.widget.RecyclerView> is this specific to an android version?

I used the above mentioned widget in my XML. However, I'm just seeing a normal list view and not a recycler view on android 5.1. Wanted to understand if the above mentioned widget is specific to a particular OS version?
From the documentation on Android Support Libraries:
Some of the Support Library packages have package names to indicate
the minimum level of the API they originally supported, using a v#
notation, such as the support-v4 package. Starting with Support
Library version 26.0.0 (released in July 2017), the minimum supported
API level has changed to Android 4.0 (API level 14) for all support
library packages. For this reason, when working with any recent
release of the support library, you should not assume that the the v#
package notation indicates a minimum API support level. This change in
recent releases also means that library packages with the v4 and v7
are essentially equivalent in the minimum level of API they support.
For example, the support-v4 and the support-v7 package both support a
minimum API level of 14, for releases of the Support Library from
26.0.0 and higher.
v7 is just part of the package name, and refers to the version of the support library your project is using. There was an earlier version (v4), which was used with API version 4 or less (Android 1.6). Version 7 support library was a later version of the support library, which worked with newer versions of Android, and introduced new features.
Some information about it here
http://developer.android.com/tools/support-library/features.html
No this denotes the version of Android Libraries.
These libraries provide specific feature sets and can be included in
your application independently from each other.
Read more here
I'm just seeing a normal ListView
Well a Recycler View is a modification to the classical ListView. In the Layout Editor it appears like that only.

Which SDK should I use to build the project with Support Library?

I'm not sure which SDK version should I use to build the project if I added a Support Library. Shouldn't I build it with 2.3.3 for example?
It doesn't really matter which version of the Platform you are using with the Support Library.
The Support Library is designed to back-port some important new features from Android (like Fragments), so they are supported in older versions of the OS (back to 1.6).
Bottom line, you can use any version of the SDK with the support library (all the way back to 1.6).
You can use the support library in API level 4 and above, so you can build it against pretty much whatever version your other APIs require.

Categories

Resources