Is there a way to prevent an app from being installed on Android Honeycomb?
I am looking for either a market filter or a manifest option.
According to this discussion on google groups (android-developers list), setting maxSdkVersion="10" will block Honeycomb; however it won't stop a device upgrading to Honeycomb (or force app uninstall) once your app is installed.
In your Android Manifest file, set the uses-sdk tag. Android 3.0 is level 11. Also note, however, that Google explicitly states that they make their code backwards compatible so you don't have to do this. If you have a good reason to, go ahead, but be aware that Google thinks most people should never have to.
Related
We use a 3rd party SDK that crashes 100% of the time on Asus devices running Android 7.0 (we can't get rid of the SDK). The same device running 7.1 will not crash. I know I can block specific devices using the Google Play Developer Console, but I'd rather not block the devices since there's a chance that they either haven't updated to 7.0, or they have been updated to 7.1.
I asked Google Play support if there was something I was missing in the console, and they said it's not possible to block a manufacturer-API combination from the dev console. However, they said there was a way to do so using the manifest, but that they weren't qualified to tell me exactly how. I haven't been able to find any information on this. The docs mention how to declare restricted screen support using the manifest, but nothing about a manufacturer.
Does anybody know a way to accomplish this using the manifest?
I have been trying to get an app install on my phone. Its compatibility page http://www.goqii.com/devices.html doesn't specify my phone.
I wanted to know how this compatibility is locked to specific phones.
Trying to reverse engineer the apk (using simple apktool), I thought about modifying the minimum/target sdk versions. These two strings show that the apk is already above the Android version on device (4.2.2 or 19)
android:minSdkVersion="12"
android:targetSdkVersion="14"
As this isn't the problem, I am thinking about how to make it work. Any ideas if this compatibility is set elsewhere? I don't see any hardware differences between the compatible phones and mine (a chinese make called Gionee).
I think you should look into uses-feature tag in the manifest. If you go through the doc:
The purpose of a declaration is to inform any external entity of the set of hardware and software features on which your application depends. The element offers a required attribute that lets you specify whether your application requires and cannot function without the declared feature, or whether it prefers to have the feature but can function without it.
So it could be NFC or Bluetooth LE or Camera etc which is required for app to run and developer has made required=true for those features in manifest.
If you're trying to download the app from the Play Store, it is very likely that the developer has defined filters on that app (http://developer.android.com/google/play/filters.html). These filters are not part of the Android Manifest and so, they cant be changed. This has been answered here already: How to restrict android app to specific device make?
Is disabling an application for newer Android versions (e.g. 4.2 and higher) possible?
I've got an application that Google has rendered useless from 4.2; I don't want users use/install it when they are using Android 4.2 or higher.
It depends on what exactly you want. According to the documentation for the deprecated maxSdkVersion:
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.
So, users could still sideload the app, but it will not appear in Google Play for users above that level. That sounds like what you want. There is no way(since 2.0.1) to completely disable sideloads.
Regarding this note about compilation:
...and the SDK will not compile if maxSdkVersion is set in an app's manifest.
I had my doubts. After testing it just now, my Eclipse/ADT compiles just fine with maxSdkVersion=15 set. So I wouldn't worry about that.
The answers regarding targetSdkVersion are fine for some things, but if you're using something that was intentionally broken/changed in a newer API, they won't work at all. For example, no amount of compatibility mode will allow 4.2+ to turn airplane mode on/off programmatically from within a non-root app. It also won't change the new implementation of SecureRandom.
If the app really is just completely useless for 4.2 because a key feature was removed, try using maxSdkVersion. Using a deprecated method always leaves me with a bad taste, but if they don't offer any sort of functional replacement, sometimes it's the only choice.
However, if you can work around it by changing how you accomplish <whatever>, that is by far the best solution.
Previously you could have set android:maxSdkVersion="integer" to 17 but after 2.1 it has been deprecated.
You can specify android:targetSdkVersion="Max_api_version_which_supported_by_your_app" to API Level: 16(4.1) below than 4.2
First, my english is not very well. I have a question:
"If i have an phone with Android 4.0 and i'm looking for a specific app. However, in the Android manifest of that app stands: maxsdkversion:"8". Will the app be displayed on thed android 4.0 phone?
No, it will not be displayed.
Per the docs http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
Google Play will continue to use the attribute as a filter, however,
when presenting users with applications available for download.
That's why, again per the docs:
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.
I've programmed my app with Eclipse and android 2.2. However I think that my app would work for previous version and so it would allow more users to use my app. The problem is that I'm not sure... for instance I'm using Gestures which I think is a more recent feature... but otherwise I'm just using some Button, ListView, and WebView.
So is there a way to detect automatically the Minimum Sdk Version needed ( by checking which function my app is using) ?
I can't download the SDK of each previous version of android and test it until it doesn't work ...
Thanks
I can't download the SDK of each previous version of android and test it until it doesn't work ..
Why cant you? This is what the rest of us do. Create various different Emulators and test it out. I've released many apps by testing this way.
Take a look at the Compatibility page on Android's developer website.
It has some great information on how to make sure your application will work on different versions of Android and how to stop users from downloading the application if they do not have the right features on their device. In your case that would be the gestures feature.
To manage this, Android defines
feature IDs. Every capability has a
corresponding feature ID defined by
the Android platform. For instance,
the feature ID for compass is
“android.hardware.sensor.compass”,
while the feature ID for Live
Wallpapers is
“android.software.live_wallpapers”.
Each of these IDs also has a
corresponding Java-language constant
on the PackageManager class that you
can use to query whether feature is
supported at runtime.
To be totally sure you have to test your app against every platform version you target. Otherwise users of your app will do it for you (and that might be not good for app rating).
On the https://developer.android.com/about/dashboards/index.html page you can see the latest up-to-date platforms share info. So just decide how many potential users you're going to leave without your app :)