1

I have gone through the following links but they don't provide a clear and definitive answer to my question. This is what I could derive from the answers:

targetSdkVersion indicates that the app is tested against the target version and will run on all android versions from minSdkVersion to targetSdkVersion with no compatibility issues.

My app's minSdkVersion=11 and targetSdkVersion=19, Now I am not sure whether devices with higher SDK versions will see my app on Google Play Store or not.

UPDATE: For those who may encounter this question here is a great article I found: http://www.thedroidsonroids.com/blog/android/compile-min-max-and-target-sdk-versions/

Community
  • 1
  • 1
Darush
  • 11,403
  • 9
  • 62
  • 60

5 Answers5

7

As Android evolves with each new version, some behaviors and even appearances might change. However, if the API level of the platform is higher than the version declared by your app's targetSdkVersion, the system may enable compatibility behaviors to ensure that your app continues to work the way you expect. You can disable such compatibility behaviors by specifying targetSdkVersion to match the API level of the platform on which it's running. For example, setting this value to "11" or higher allows the system to apply a new default theme (Holo) to your app when running on Android 3.0 or higher and also disables screen compatibility mode when running on larger screens (because support for API level 11 implicitly supports larger screens).

Android Developer, So the answer is yes, but you might want to consider testing and updating to current SDK version.

Andreas Evjenth
  • 500
  • 3
  • 8
  • That is what I was expecting from an answer. Thanks – Darush Jul 07 '16 at 12:47
  • Thank you. I saw that @MarkoNiciforovic gave a short and correct answer of what you actually asked for, but just thought that people that search this up also should know why they should consider updating the TargetSdkVersion anyway. – Andreas Evjenth Jul 07 '16 at 13:28
2

Yes, devices with higher SDK versions will see your app. Features of newer SDKs like granular permissions in Android 6.0 will not be available if they are not supported in your code.

The documentation for android:maxSdkVersion makes the situation clearer:

Warning: Declaring this attribute is not recommended. First, there is no need to set the attribute as means of blocking deployment of your application onto new versions of the Android platform as they are released. By design, new versions of the platform are fully backward-compatible. Your application should work properly on new versions, provided it uses only standard APIs and follows development best practices. Second, note that in some cases, declaring the attribute can result in your application being removed from users' devices after a system update to a higher API Level. Most devices on which your application is likely to be installed will receive periodic system updates over the air, so you should consider their effect on your application before setting this attribute.

mattm
  • 5,851
  • 11
  • 47
  • 77
1

It works on SDK 11 and upwards, as in your first Link stated.

1

Yes. Your app will be visible to the devices with higher sdk versions than your targetSdkVersion.

By specifying targetSdkVersion you can restrict google by applying default compatibility behaviours.So that you will get along with the api level of the device in which your app is running.

0

Yes, newer devices will see it. Let's do a thought experiment. Let's go back in time one year. We build an app, setting the minSDKVersion and targetSdkVersion to X, the highest available number in the toolset. Six months ago, X+1 got released. And today I just bought a new phone that runs X+1, and I'm very excited! Wait, what? That brand new app isn't in the store? But it worked on my old phone!

That would be crazy. :)

As a more concrete example, here's an app that has minSdkVersion 15 targetSdkVersion 17: https://play.google.com/store/apps/details?id=com.nasarallysport.rallyracetimer I just verified that I can see it in google play with my Nexus 6 on api 23.

MotoRidingMelon
  • 2,347
  • 2
  • 21
  • 28