My Android application uses minSdkVersion=3 and targetSdkVersion=8. I used 8 because that is the highest level of API the application was tested on; however, it was written for level 3 and does not use any features beyond that level (except one for level 4 using reflection). Could using targetSdkVersion=8 be causing:
the Android Market to filter the application for some devices? My intention is for the application to be available for ALL devices >= level 3 with NO filtering.
problems in the application since targetSdkVersion=8 will, according to google: "disable compatibility settings that are not required for the target version (which may otherwise be turned on in order to maintain forward-compatibility) or enable newer features that are not available to older applications".
No. targetSdkVersion:8 just tells the system that you support SDK 8 features, like installing to SD card. minSdkVersion is what will filter the app and hide it for users with a lower SDK.
Related
There are some limitations which are imposed by Google in newer versions of the Android and I do not want people to give bad reviews about the app on PlayStore. So, how to can I exclude the newer version of the Android
You can use maxSdkVersion.
From https://developer.android.com/guide/topics/manifest/uses-sdk-element#max:
android:maxSdkVersion
An integer designating the maximum API Level on which the application is designed to run.
In Android 1.5, 1.6, 2.0, and 2.0.1, the system checks the value of this attribute when installing an application and when re-validating the application after a system update. In either case, if the application's maxSdkVersion attribute is lower than the API Level used by the system itself, then the system will not allow the application to be installed. In the case of re-validation after system update, this effectively removes your application from the device.
To illustrate how this attribute can affect your application after system updates, consider the following example:
An application declaring maxSdkVersion="5" in its manifest is published on Google Play. A user whose device is running Android 1.6 (API Level 4) downloads and installs the app. After a few weeks, the user receives an over-the-air system update to Android 2.0 (API Level 5). After the update is installed, the system checks the application's maxSdkVersion and successfully re-validates it. The application functions as normal. However, some time later, the device receives another system update, this time to Android 2.0.1 (API Level 6). After the update, the system can no longer re-validate the application because the system's own API Level (6) is now higher than the maximum supported by the application (5). The system prevents the application from being visible to the user, in effect removing it from the device.
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.
What criteria should a developer consider when choosing the minimum API level for his Android application?
According to the dashboard, only 3.2% of Android devices are using an API level that's less than 17. But are those devices worth accommodating for? Who is it that won't update their Android device? Are they hobbyists or test devices that will expect incompatibility with most apps?
Indeed, as a developer, you ought to decide if the number of users who would potentially download your app for those versions of Android is worth to put effort into developing the app for those versions.
Besides the distribution percentage, it depends on your target audience and the type of application you wanna create aligned with business goals.
As a matter of fact, you should take into account the compatibility of some API features you may implement such as hardware access permissions and so on.
I am thinking to make an application but at the time I don't have API 21 and API 22 installed on my SDK due to some network problems and I'm unable to download any thing at the moment. I was wondering if I can make an app effective enough to target many devices without using API 21 and API 22.
Bilal, judging from your comments to others, I'm getting the impression that you don't fully understand how the API levels work in Android. Let me try and explain.
The minimum API level is pretty self-explanatory, as it refers to the minimum Android OS version that can run your app. You want to set this as low as possible to target the most devices. To determine which level you set depends entirely on your application. For example, if your app requires access to the Calendar APIs, your minimum API level would be 7, because that is when those APIs were introduced.
You almost always want to set your maximum API level to the highest possible. Google encourages this, because it allows you to take advantage of all of the new APIs that have been released. But what about the devices that are outdated? You can still enable backwards compatibility with those devices using the Support Library.
Finally, it is not necessary to download each and every API level in the SDK manager. You only need to download the most recent.
I want to implement a program that uses HCE, but my device has Android 4.3 and does not support HCE. Is it possible to deploy a HCE app to devices with API versions < 19?
No, that's not possible. The Android system before version 4.4 (API level less than 19) does not include the software stack that is necessary to perform HCE.
That's the point of having different API versions (levels). Each API level adds (and sometimes removes) functionality that is available to your apps. Specifically with API levels on ANdroid a higher level typically means more (with the exception of depreciation/removal) functionality. As HCE was introduced in API level 19, devices having a lower API level do not support that functionality.
Sometimes, however, there is functionality that is backported to lower API levels by means of Support Libraries. This is typically done to provide a consisted look and feel for apps across a broad range of platform verions and is mainly done for grahical user interface components. However, support for HCE requires modifications deep inside the Android system (NFC system service, NFC low-level library) that cannot be achieved by simply adding a support library to an app.
I have an Android device, apparently with API Level 10.
I'm developping an Android Application and I need to test it on API level 12.
I don't know much about Android and API levels, so my question is: Can I update my device to a higer API level ? (it says no New version available, aren't hier APIs considered new version?)
(I can't use the Emulators, as they really need a huge amount of ressources to start.)
Alternatively, is it possible to test the following code, on my API Level 10 device ?
UsbManager manager = (UsbManager) this.context.getSystemService(Context.USB_SERVICE);
I have the following warning:
Yes higher API levels = latest releases.
http://en.wikipedia.org/wiki/Android_version_history#Version_history_by_API_level makes the correlation between API and version number (2.3.4).
You should work with a device supporting latest api and high resolution because many of your users might have that and you NEED as a developer to see and test your work on these platforms.
Get yourself a nexus phone, you can upgrade these to the latest Android version.
Android version release : Google releases it --> manufacturers and Telecom Carriers checks and adjust the release before making it available to you. Hence, for old phone, the manufacturers and carriers don't make the effort and you are stuck to old versions.
If you do no want to or if you cannot find a more recent handset, you can install a custom ROM to try to reach API 12. But in any case, if you start developing, you ll need good handset soon.
good luck
You can try to see if there is a custom rom for your device that is of a higher api version. But this won't accurately test your app because there is probably a very good reason that a newer operating system was not made available for your device. As such, your app and the SDKs in the new API will probably not be able to make use of the hardware resources available, and you won't get an accurate representation of your app's performance.
You mentioned you can't use emulators but have you considered Genymotion's emulators? Although it is resource intensive it is better than Google's emulators and is faster than actual devices.
Assuming your using Eclipse ADT. You DONT have to update your device to level or API 12. All you have to do is specify the minimum required SDK, which is API 8 in most Eclipse ADT setups. and set your target SDK to API 12. That way your app will run on devices from API 8 through to API 12 Including you device. FYI the latest API is now 19 (Android 4.4) Hope this helps.