minSdkVersion as low as possible
See original GitHub issueTo allow as many users as possible to participate, the minimum Android version should be as low as possible. Since BLE is introduced in Android 4.3 (API 18), this would be the ideal minSdkVersion
.
With the help of the Android linter, I will summarize the sections that would be highlighted as incompatible depending on the API version one would pick as a minSdkVersion
.
API 21
- The library
androidx.security:security-crypto
only supports API 23. Likely, it could be replaced with the library Android-Vault, which uses the Android keystore to store the key as well.
As well as these trivial issues:
PowerManager.isIgnoringBatteryOptimizations(String)
: battery optimizations were only introduced in API 23.AlarmManager.setExactAndAllowWhileIdle(int, long, PendingIntent)
:setExact(int, long, PendingIntent)
would provide the same behavior up to API 19.
API 19
- A lot of Bluetooth APIs were apparently rewritten; those rewrites are only included in API 21. As such, using the old (deprecated) methods would require a rewrite of
BleClient
andBleServer
as an alternative for older devices. Some calls inGattConnectionTask
would have to be changed.
API 18
Trivial issues:
AlarmManager.setExact(int, long, PendingIntent)
:set(int, long, PendingIntent)
would give the same behaviour.Objects.hash(Object...)
: The call inDayDate
could return thetimestampRepresentation
value as a hash directly.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:8 (1 by maintainers)
Top Results From Across the Web
<uses-sdk> | Android Developers
You can determine the lowest possible platform version by compiling the application against successively lower build targets. After you ...
Read more >Any disadvantages of setting minsdkversion to a very low ...
So setting a minSdkVersion defines on which devices your application is allowed to run. That way, you can safely use APIs that were...
Read more >Change Android Minsdkversion in Flutter - 2 Easy Ways [2022]
There are two ways you can change Android minSdkVersion. The first one is for the projects that are created before Flutter 2.8 update...
Read more >Picking your compileSdkVersion, minSdkVersion ... - Medium
minSdkVersion (lowest possible) <= targetSdkVersion == compileSdkVersion (latest SDK). You'll hit the biggest audience with a low ...
Read more >Support Android minSdkVersion | Voters - Expo - Canny
It seems like a small, simple change to support given "uses-sdk" is already being used. ... Instead of Expo Go, you can build...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
New information from Android Exposure API:
So the minimum version should be API 21.
@corrado4eyes I believe there should be an implementation independent from GMS, see #10.