Is there a way to disable a specific version from Google Play.
For example hide/disable Honeycomb version 3.1 from Google Play?
Currently I have
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"/>
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="10"/>
But I don't want user with version 3.1 to see my app.
Thanks!
In google play you can upload multiple apk's, so that you can have different versions to target different platforms (perhaps you have a version with newer sdk features, but you keep another version built for older phones w/ different features)... you could have two, with the same code: one that targets below up to 3.x, and the other that targets above... you'll then have to maintain two apk's with the same code, of course. Also I don't think it prevents them from side-loading, it just filters it out of their results on the play store app.
Suppose you want to block only 3.1, and you support from 1.5+ up to 4.1
For one apk, you'll have:
<uses-sdk android:minSdkVersion="3"
android:targetSdkVersion="16"
android:maxSdkVersion="10" />
And for the other:
<uses-sdk android:minSdkVersion="12"
android:targetSdkVersion="16"
android:maxSdkVersion="16" />
Of course, adjust the targets and bounds as they make sense. It might be grumpy if max < target, I'm not sure. And keep in mind target sdk compatibilities..
AS a follow up, here's some insight from the documentation on multiple apk's:
API level
This is based on your manifest file's element. You can use both the android:minSdkVersion and android:maxSdkVersion attributes to specify support for different API levels.
For example, you can publish your application with one APK that supports API levels 4 - 7 (Android 1.6 - 2.1)—using only APIs available since API level 4 or lower—and another APK that supports API levels 8 and above (Android 2.2+)—using APIs available since API level 8 or lower.
Note:
If you use this characteristic as the factor to distinguish multiple APKs, then the APK with a higher android:minSdkVersion value must have a higher android:versionCode value. This is also true if two APKs overlap their device support based on a different supported filter. This ensures that when a device receives a system update, Google Play can offer the user an update for your application (because updates are based on an increase in the app version code). This requirement is described further in the section below about Rules for multiple APKs.
You should avoid using android:maxSdkVersion in general, because as long as you've properly developed your application with public APIs, it is always compatible with future versions of Android. If you want to publish a different APK for higher API levels, you still do not need to specify the maximum version, because if the android:minSdkVersion is "4" in one APK and "8" in another, devices that support API level 8 or higher will always receive the second APK (because it's version code is higher, as per the previous note).
http://developer.android.com/guide/google/play/publishing/multiple-apks.html
you could use maxSdkVersion="11" (but then you also exclude Android 3.2 and Android 4.x); I'm not sure this suits your needs.
Related
I'm building an Android application using Xamarin. Visual Studio allows you to specify the target and minimum SDK level for Android, and this seems to work correctly, as decompiling the APK shows these attributes on the manifest tag of AndroidManifest.xml:
platformBuildVersionCode="25" platformBuildVersionName="7.1.1"
Please not that this is not the manifest file in the project, but rather the manifest file bundled in the final application. The latter does not have uses-sdk values.
However, I don't seem to be getting the expected functionality at runtime for targeting this version. Specifically, the app never asks for runtime permissions (introduced in API 23 IIRC), and when you try to revoke a permission on the app, you get this message:
This app was designed for an older version of Android. Denying permission may cause it to no longer function as intended.
This has been noted on several devices running above API 23, including a Pixel, which should be running stock Android and have no issues with detecting SDK version.
How is Android deciding which SDK version I'm targeting if it's not using the manifest values? How can I ensure my app will have access to API 23 features at runtime?
I believe this information is encoded in the signature of the APK, as the minimum SDK version is a parameter given to apksigner:
--min-sdk-version Lowest API Level on which this APK's signatures will be
verified. By default, the value from AndroidManifest.xml
is used. The higher the value, the stronger security
parameters are used when signing.
I'm not 100% sure on this, but it seems like this is the only way Android could know without using the manifest directly, and it would explain why it was possible for the manifest value to not match the value seen at runtime.
Though-out ionic 2's development iv been building my app and testing it in the BETA channel of Google Play and everything's been going fine, today I updating to ionic 2 final and passed it to ionic package to build an APK for me...
ionic package build android --profile android --release
I have since uploaded it to Google Play and I'm getting...
A device with API levels in range 17+ is eligible to receive version 76, which is optimised for higher API levels, but actually receives version 3000328 because it has a higher version code. This would occur when Release track containing any of [BETA] and Screen layouts containing any of [small, normal, large, xlarge] and Native platforms containing any of [arm64-v8a, armeabi, armeabi-v7a, x86, x86_64] and Features containing all of [android.hardware.FAKETOUCH, android.hardware.LOCATION, android.hardware.location.GPS, android.hardware.location.NETWORK, android.hardware.screen.PORTRAIT].
A device upgrading from API levels = 16 to API levels in range 17+ would become eligible to receive version 76, which is optimised for higher API levels, but would actually receive version 3000328 because it has a higher version code. This would occur when Release track containing any of [BETA] and Screen layouts containing any of [small, normal, large, xlarge] and Native platforms containing any of [arm64-v8a, armeabi, armeabi-v7a, x86, x86_64] and Features containing all of [android.hardware.FAKETOUCH, android.hardware.LOCATION, android.hardware.location.GPS, android.hardware.location.NETWORK, android.hardware.screen.PORTRAIT].
A device with API levels in range 17+ is eligible to receive version 76, which is optimised for higher API levels, but actually receives version 3000258 because it has a higher version code. This would occur when Release track containing any of [BETA] and Screen layouts containing any of [small, normal, large, xlarge] and Features containing all of [android.hardware.FAKETOUCH, android.hardware.LOCATION, android.hardware.location.GPS, android.hardware.location.NETWORK, android.hardware.screen.PORTRAIT].
A device upgrading from API levels = 16 to API levels in range 17+ would become eligible to receive version 76, which is optimised for higher API levels, but would actually receive version 3000258 because it has a higher version code. This would occur when Release track containing any of [BETA] and Screen layouts containing any of [small, normal, large, xlarge] and Features containing all of [android.hardware.FAKETOUCH, android.hardware.LOCATION, android.hardware.location.GPS, android.hardware.location.NETWORK, android.hardware.screen.PORTRAIT].
Some devices are eligible to run multiple APKs. In such a scenario, the device will receive the APK with the higher version code.
76 is my current production version from 20 Aug 2015 (API Level 16+)
3000258 is an old BETA from Dec (API Level 16+)
3000328 is my latest BETA build from Today (API Level 16+)
I just want to use 3000328, but Google Play won't let me deactivate 3000258, when I do it says...
It is forbidden to downgrade devices which previously used M permissions (target SDK 23 and above) to APKs which use old style permissions (target SDK 22 and below). This occurs in the change from version 3000258 (target SDK 23) to version 76 (target SDK 0).
Any ideas why I can't deactivate 3000258? Thanks
I see that you have listed the API levels that were used (API Level 16+), I am assuming that this is the minSdkVersion but the important attribute to check, and set in this case is the targetSdkVersion.
It's an issue caused by Google/Androids new permission system as of Android 6. Essentially if the app has been released with a targetSdkVersion of 23 there is a newer method of permissions management, that is not backward compatible. Google therefor will not allow you to downgrade the users who currently use the older permissions system, part of sdkVersion 23+, to a lower version.
It seems that the ionic build --release selects the highest available sdk version by default, which may be the reason that you have submitted a version in the past at a higher SDK version without explicitly stating it in your config.xml. For some reason now, your builds are using a lesser sdk version, and resulting in the errors you are seeing.
The quick solution, is to enforce the targetSdkVersion for SDK v23 to ensure that it will pass the activation process. It will, however, mean that only Android 6+ devices can download and use the app.
You can enforce this sdk version config.xml in the root of your Ionic project by adding
<preference name="android-targetSdkVersion" value="23" />
After re-running the build process, double check the android manifest to ensure that it propagates correctly in this format:
<uses-sdk android:minSdkVersion="16"
android:targetSdkVersion="23"
android:maxSdkVersion="23" />
Failing all of that, a StackOverflow user has reported a potential workaround that involves disabling beta testing altogether.
Problem is not about 3000258. There is a problem about 76, probably about Target SDK version of that so you have to focus on 76, solve SDK Target problem and then you can disable 3000258 i quess.
I wrote this just in case if you trying to change 3000258 SDK Version. If you already tried to change SDK Target of 76, Don't mind this answer.
Preparing application with following configuration:
<uses-sdk
android:maxSdkVersion="18"
android:targetSdkVersion="17"
android:minSdkVersion="8" />
But application installing properly on lollipop devices. Can anyone explain the matter why this is occurred.
android:maxSdkVersion is no longer checked beyond Android 2.0.1 as stated by developer.google.com:
Future versions of Android (beyond Android 2.0.1) will no longer check
or enforce the maxSdkVersion attribute during installation or
re-validation. Google Play will continue to use the attribute as a
filter, however, when presenting users with applications available for
download.
Reference:
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#max
Switch To Android Studio
android:maxSdkVersion — Specifies the maximum API Level on which the application is able to run.
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.
Future versions of Android (beyond Android 2.0.1) will no longer check or enforce the maxSdkVersion attribute during installation or re-validation. Google Play will continue to use the attribute as a filter, however, when presenting users with applications available for download.
Read Official Document
There is a line in the AndroidManifest.xml
android:minSdkVersion="10" android:targetSdkVersion="19"
Does it mean that if I include minimum and maximum SDK version in the AndroidManifest.xml file and build the APK using phonegap/cordova CLI (Command Line Inteface),
than a SINGLE APK file generated can be installed on ALL Android Devices ranging from Android 2.3.4 to Android 4.4
I have read posts that developing using Android SDK(native APP) it enables the APP to work on the range of devices.
Is it true for PhoneGap/Cordova generated APK file as well? (Note: I am not planning to use Google Play services for distributing the APP.)
Do we need to generate APK file for each SDK version?
The implications of these two variables is the same for both native apps and PhoneGap/Cordova apps.
minSdkVersion will set the minimum version of Android required to run your application. If a user is running any version below this, they will not be able to install your application (regardless of whether or not you are distributing via the Play Store).
targetSdkVersion specifies the latest version of Android that you have tested for. It will not change who can install your app, but it will change the behavior of your application. For example, if this is less than 14, you won't have an action bar. If it is less than 19, then users running KitKat and above will not see your content in a Chrome-backed WebView (it will be the older WebView implementation).
Generally you just set targetSdkVersion to the latest available version of Android.
Do we need to generate APK file for each SDK version?
No. You need one APK with mindSdkVersion set to the minimum version you support and targetSdkVersion to the latest version of Android you have tested against.
You can specify a maxSdkVersion, which will actually limit the maximum version you support, but you generally should not do this unless you have a good reason to.
android:minSdkVersion is the minimum API level that device needs for run your app.
android:targetSdkVersion is the latest tested API that works with your app, and you should set there the latest API version.
Following useful data about the number of devices running API versions: https://developer.android.com/about/dashboards/index.html?utm_source=ausdroid.net
I have the targetSdkVersion set as 17 in my manifest. Kindly let me know if there will be any problem when I run this in the phone which has the API of 18.
Manifest xml :
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
I will not support API 18 and if you upload it to play store
then it will not be visible for all device > API 17
For example my Application which is uploaded to Play Store have 10 - 18 API support
so it support 3326 Type of devices on play store similarly and it is available for those api level devices only
My app on PlayStore
Permissions also matters
Say if you want Wifi Permissions and device not have wifi it won't be visible for those device who don't have wifi
If you directly install it to Device > API 17 it will give warning but will install
The Official Documentation Mentions here
From the official documentation (link):
To maintain your application along with each Android release, you should increase the value of this attribute to match the latest API level, then thoroughly test your application on the corresponding platform version.
No. But it is recommended to set android:targetSdkVersion to the newest version.