Android API selection for my app - android

I'm building my first android app and slightly confused when choosing the right API. I've noticed that some functions are available starting from API 21. But then, why in the world would anyone use API 21 or higher if it's only supported by 40.5% of android devices??? Only 4 out of 10 sounds ridiculous to me. Or, is there something I'm missing?
Thanks.

Well it actually depends on you as a developer to know your target audience, and choose the right API target. Nevertheless, all these new features and functionalities that you think are only available for new APIs all have support through the use of Android Support Library. You can still have access to all the newer APIs through support libraries officially provided by android.
Android Support Library
At the end of the day you would want to target as many devices as possible to get a wider audience for your app.

now google research on the android "O". so its very soon new android application development API coming but you are say that you create your first android application so you need to fist familiar with all api so for you batter is you use minimum 16 and maximum 23 or 24 what ever you chose.if you chose latest api's so that u have latest android studio version.
for you all name and api details

Related

Choosing API level for Android

I understand the dilema in choosing a proper API on my Android project (more func vs. device market share) but what are your suggestions for proper level on a simple map using Retrofit and Google Maps?
These days with the support libraries and all, it is not necessarily about offering more functionality, but more about how far you want to go to offer devices with API 23 the same as devices with API 15 for example.
Is it worth the extra 20 hours of development, just to add support for API 14 so you can reach 2% more users? It is all up to your needs and and wishes, how much time you have and how much time you want to spend.
Some times you will have no choice because your boss or his client makes the decision for you, but if the choice is yours alone, it all boils down you want you want and what is best in your situation.
Numbers used here are made up to illustrate the example.
I thinks this definitely depends on your requirements. Do you already know the Android Dashboard?
https://developer.android.com/about/dashboards/index.html
We recommend our customers API level 16, which targets > 90% of all devices currently. On the other hand, if its really just a simple app, why not support API level 9 as well, if it does not produce much more effort. A lot of new APIs are also backported via the Support-Libraries.
Maybe another question is, do you want to use some APIs which are only available for a specific API level? e.g. If you would like to target a arabic audience, it might be a good idea to start with API-Level 17, as it supports RTL-Layouts natively.

Does Google Play library have backwards compatibility support? (And other libraries)

I was reading this tutorial http://www.androidhive.info/2015/02/android-location-api-using-google-play-services/ and I find it amazing that this one and many others never state what versions they support.
There must be a simple list which contains what libraries are for what api versions, not just Google Play library but for everything else, from reading file paths to camera api. An example would be just the camera api 2, which is for api version 21 and above. A nice list listing all of this would be very helpful!
It's extremely time consuming tracking down all of this information.
I would say that there is one - in packages documentation you can easily filter by API number.
Official Android APIs have their API number define on official Android documentation like #sebap123 said.
Google Play Services isn't part of Android itself. It's a complimentary add-on. Google Play Services runs on Android 2.3 or higher. All new GPS APIs included in GPS will run on all these devices that have GPS(Android 2.3 or higher). Unlike new Android APIs that only run on new version of Android.

Does new Android API includes all previous version API?

This may be a noob question as i am new to Android development.
So i downloaded ADT and when i started SDK Manager it threw me a long list of Android APIs; i installed the latest API but i got confused as i don't know if i only install API 20 will i get full Android API or specific to that version/release?
For example: I downloaded API for KitKat so i get the full API with all the classes and interfaces? or only the new ones that are introduced in KitKat?
If you download API 20, you will get all the API's that are available to the level 20. It means you will get the new features, AND all the apis that are required to develop for devices running level 20.
It does not mean that you will only get the updates
Some features might be deprecated in a newer version. That means if a particular function has been changed, you will get updated version in the respective level.
It will give you a latest API, but if any feature are been diprecated, they won't be included in them. But for startup purpose its no stuffs to worry about having only one API installed.
refer the below link:-
Android API References

Android apps targeted at Android 2.2 and Google Maps V1

I'm pretty new to Android dev, not so new to Java. Anyhow I'm in the planning stage of my application which will rely heavily on Google map api.
I wanted to jump in to the code today but came across this dilemma. I won't be using any special UI components or anything so new that I would need to set my targeted version to higher than 2.2.
First thing I would like to display a map via Google map api. Anyhow the problem I have is when visiting https://developers.google.com/maps/documentation/android/v1/ To learn more about the API and how to use it I found out that it's no longer supported and has been replaced with V2. What bugged me was the statement that they are no longer releasing api keys for Google maps V1. And the V2 requires minimal Android API to be 17 which puts my app targeted at phones running Android 4.3+ which does not really cover that much devices.
Does this mean my application is a no-go and I have to deal with it being targeted for Android 4.3+ or can I still use V1 and target my app for Android 2.2+
Thanks in advance
The minSdkVersion of apps using the Google Maps V2 API for Android is not 17, but 8.
What you mean is probably the targetSdkVersion which should always be the highest available.
So you're good to go there.

Targeting Google APIs

I'm new to Android Development and Eclipse and I'm going through the various tutorials.
When setting up Eclipse I installed Android 2.3.3 SDK Platform along with Google APIs for that platform.
When I create new projects for most all of the tutorial programs I select Android 2.3.3 as my target.
However, when going through the Google Map Views tutorial I am told to select Google APIs instead of Android 2.3.3 when creating the project. I did this and the map view program works just fine.
But this seems like a binary OR decision; I'm allowed to select one or the other. Does the Google APIs include all that's in the Android 2.3.3 platform? In other words could I just always select Google APIs target for the platform level that I want and it would work?
Thanks,
Dean
Yes, it would always work because the Google APIs is a superset of the Android SDK.
Google APIs Add-On is an extension to the Android SDK development environment that lets you develop applications for devices that include Google's set of custom applications, libraries, and services. A central feature of the add-on is the Maps external library, which lets you add powerful mapping capabilities to your Android application.
You shouldn't make use of it unless you need to. This will save the system the extra work required to load these unnecessary features at runtime.
Right now the Google API SDK is mostly used for the proprietary Google Maps API in it.
You only want to select this as your target when you require specific API's inside of it. If you don't use Maps in your app, you can usually leave it off. It does include everything that is in its accompanying Android SDK.
When you select this as your target, it makes it so only devices that are running a ROM with the Google API SDK can see your app on the market.

Categories

Resources