I want to upgrade my project to api level 27 from api level 25. I used plenty of third party library like RxJava, Exoplayer , dagger etc.
RxJava version used in my project is 1.x.x not 2.x.x. So I have following questions
If I am upgrading gradle with current api level, whether other third party library need to be upgraded to target api level 27 ?
If yes. there are several library which still using 24 or 23 targete api and no update available so for. Is there is any issue using this ?
Meet Google Play's target API level requirement document say all apk from November need to target api level 26 details. So this applies to third party library too ?
Suppose I am using some image crop library having targeted version 23. In that case will my apk get rejected from google play store ?
If I am upgrading gradle with current api level, whether other third
party library need to be upgraded to target api level 27 ?
I don't think you'll need to upgrade those third-parties libraries because it's out of your hands I'd say and that's all depends on the developer. But, it should work fine i suppose. Also, you may wanna consider using the latest version for libraries when updated the API to 27.
If yes. there are several library which still using 24 or 23 targete
api and no update available so for. Is there is any issue using this
?
It might just cause some issues(not working, not compatible or ...) because of new API on Android itself(behavior or etc) using newer versions but, there will be new updates of course and mostly, most of them works in my side.
Meet Google Play's target API level requirement document say all apk
from November need to target api level 26 details. So this applies to
third party library too ? Suppose I am using some image crop library
having targeted version 23. In that case will my apk get rejected from
google play store ?
The answer to this question is "Perhaps". I mean, if they said it should be at least supporting v26 APIs, so, some libraries might not work (Depreciated codes-methods)on the new APIs and might Google recognize that and your app won't be accepted so, you may wanna update as they just said and reconsidering targeted APIs with libraries which supports the targeted API +.
Related
I have users and showing ads from Android API Level 16. However, Google Mobile Ads SDK 21 requires a minimum Android API level of 19. How can I target the users of API Level 18 or earlier?
dependencies {
implementation 'com.google.android.gms:play-services-ads:21.0.0'
}
You can't use the latest AdMob SDK on devices below API 19.
The minimum supported SDK by Admob 21.0.10 is now 19.
You can either set your app to use minSdkVersion 19 or use AdMob's older SDK version i.e 20.6.0.
Of course there is a a way: flavours
You'll have to manage and build two apps basically. One "old" version and a new one. The difference will only be the dependencies and the specific class, that uses this dependencie. You will create 2 versions of that class. the rest stays the same. In the end you wil have to compile two APK and ship two APKs.
Google Play store will accept both and hand out the "old" version to old phones and the "new" version to new phones.
This is a bit complex and time cosnuming and all depends if it's worth it for your specific use case. It works great and Android Studio let's you swap between the two code bases very easily.
From here and here Google says "Make sure that your third-party SDK dependencies support API 29".
However, Google doesn't say what happens if third-party libraries don't target API 29. For example, greenDAO targets API 25. It's not clear to me what happens if my app targets 29, but greenDAO targets 25 - is this resolved somehow?
I'm assuming that so long as my app targets API 29, it will continue to auto-update, because this is the current state of the world: Play store currently requires at least API 28, and my app auto-updates even with third party targets targeting less than API 28.
I found the following topics, but they weren't comprehensive.
Dependencies in the app to fulfil the API Target 26 in Aug/Nov 2018
https://www.reddit.com/r/androiddev/comments/8wxuci/questions_about_3rd_party_libraries_targeting_api/
Somewhere on the official pages they list a really low API level for maps v2, however, i am currently compiling with play-services-maps 17.0.0 and this seems to require a certain version of the play services app to be installed and THAT in turn requires a certain minimum API level of the device.
But how do i find out what that minimum is ? On an old device with 4.4.2 the play services app is stuck at somewhere 13.8 ish and the map does not run giving the "App is having trouble with Google Play Services. Please try again".
If i google this i find answers here on SO suggesting to just lower the maps to 16.0.0 which is NOT a solution. I have no problem setting the apps minium API to something higher IF i only could find out how high i need to go. Android Studio is letting me compile just fine with minsdk 19 but a device with 19 will not run the map so...
Any ideas/answers are welcome
Didn't find any minimum sdk version in the official documentation. But found some observations. Check below:
Warning: This release is a MAJOR version update and breaking change. The latest update to Google Play services and Firebase includes the following changes:
Migration from Android Support Libraries to Jetpack (AndroidX) Libraries. Libraries will not work unless you make the following changes in your app:
Upgrade com.android.tools.build:gradle to v3.2.1 or later.
Upgrade compileSdkVersion to 28 or later.
Update your app to use Jetpack (AndroidX); follow the instructions in Migrating to AndroidX.
Version 17.0.0 of Google Maps includes in this release.
I have an app available for android on google play
I'm willing to make it runnable for api level >= 15
One of the apis I use in my app is crashing on api level < 20, so in order to make it run fine i need to import a third API (only for those versions, it looks like android has included the required components in newer versions)
How can a build an apk and tell google play to use this apk (larger since it includes more apis) only for api level < 20 and still use the other one for the newer version?
If I get it right you need multiple APKs for different API levels
This is the relevant Google documentation for that https://developer.android.com/training/multiple-apks/api
This done with the use of minSdkVersion and maxSdkVersion
ie.
- "older support" you can use minSdkVersion = 15 and maxSdkVersion = 19
- for newer APIs minSdkVersion = 20 without defining any max version.
Then you have to use different Version code in these apps with a sophistigated pattern for application versioning:
Check here the Using a version code scheme
eg.
According to the new policies for submitting or update new apps to Play Store:
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html
https://developer.android.com/distribute/best-practices/develop/target-sdk
We have some doubt regarding the libraries, Should we compile the library again with the last targetSDK?, or just validate that we don't have any problem with the last targetSDK for example if my library has the targetSdkVersion 23 and works fine in apps with targetSdkVersion 26, will the Play Store not reject the application?
The Play store just looks at the target SDK of your final compiled APK. So if you can get it to compile fine, and you can confirm by testing it works then that should be fine as far as the Play store is concerned. Once a jar/aar is compiled into an APK I don't believe the Play store can know the original targetSdk.
just validate that we don't have any problem with the last targetSdkVersion for example if my library have the targetSdkVersion 23
Most of the Android versions provide backward compatibility but by providing a higher targetSdkVersion even with a lower compileSdkVersion, the app will have better flexibility and accessibility of the latest Android API. If you follow some of the Android Release documentation, you will notice some new features offered would be remove from the latest API update. If your app have set the latest targetSdkVersion, the Android Studio will tell you which API has been deprecated, for example, some changes to service, if your app used the implicit intent for BindService, it will throw you an exception. Therefore, it is always recommended to implement the latest targetSdkVersion.
At the moment, if I'm not mistaken, the Play Store will still accept the app with lower targetSdkVersion. But it is recommended that you recompile to the latest targetSdkVersion as Play Store would request that in some time.
I hope it answer your doubt, cheers!