Emrullah Kızıltepe
Emrullah Kızıltepe

Reputation: 95

Android Version Differences

I would like to know whether android has supports for the older versions. There are 15 different levels for android currently and I wonder about the followings.

  1. Can a project made on level 5 be used on the devices whose level higher than 5?

  2. How can I find the detailed differences between all the levels. For example, android.widget.VideoView starts with which level?

  3. Assume I made a project based on level 8 nowadays and after a while like 2 years, level 20 has been introduced by that time. And I would like to use one of the classes that belongs to the level 20. I guess there is no way for me to use that class without upgrading my project level to the 20. In this case, is it possible that level 20 doesn't accept some of the classes I used with level 8? If yes, what can be the solution? Can I download the jar file of level 20 and reference it in my project manually? If possible, does this mean that I don't have to upgrade my project level to 20 in order to use classes of level 20?

I am going to start a project in a few days. However, I didn't decide the level yet. I got confused the differences of levels.

Upvotes: 0

Views: 534

Answers (3)

Michael Kohne
Michael Kohne

Reputation: 12044

1 - yes. Android devices support running code from older levels.

2 - look through the Android docs. It even lets you filter by API level.

3 - Higher levels always let you use the lower level classes. It's just not recommended.

To decide what to support, I looked at the current distribution dashboard to see what was really out there and using the market. I went with level 7 for what I was doing, but that's just me. Level 8 would also be a good place to work from.

Also, if you want to access the better parts of the API on supported devices, but still work on older versions of the API, there's advice in the answers to this question.

Upvotes: 0

caiocpricci2
caiocpricci2

Reputation: 7798

Hope this helps:

1- Yes A project made on lower levels will work on higher levels.

2- In the page of the component. For example for android video view you can check in the top right corner SINCE: API LEVEL 1

3-You are right, if you want to use level 20 classes your project will have to be upgraded to level 20, but as far as I know there are no compatibility issues for higher versions. You should take note about the deprecated classes though. Avoid using them because they might not be available later.

Upvotes: 0

Thommy
Thommy

Reputation: 5417

  1. Yes
    Until know all Levels are backward compatible and most likley this will continue a while.
  2. http://developer.android.com/reference/packages.html -> Filter by API Level
  3. Yes you have to upgrade. But you can set the compatibility to a level below that. Than you have to take care that none of the Methods of lvl 20 will be executed in lvl <=19. You can do this by determine the current Version while running your App
    Build.VERSION.SDK_INT gets you the API level.

Upvotes: 1

Related Questions