Brendan
Brendan

Reputation: 2371

I want to make my Android app min API 8. The docs give me functions that are not available in API 8. Where should I look?

Sorry, I had some trouble writing a short title for this!

I want my app to have a minimum API level of 8. But Google's docs don't care. They only document the API in its most up-to-date form. I know that the things I want to do were possible before API 9, but how can I find out how they were done "back then"?

The case in point, by the way, is getCameraInfo(). In fact, the whole Camera.CameraInfo class only existed since API 9, but there must, before API 9, have been a way to get information about the phone's camera.

I can't seem to make any headway on this issue (even just the specific CameraInfo example). Is the only answer to cut out 20% of my userbase and make 9 the minimum API level? What about when, as the app progresses, I find that a feature I want to use requires, according to the docs, a class that was brought in in API 12?

Edit: Oh gahd... this is awkward and unlikely. I didn't specify, but the info I'm actually looking for is the physical orientation of the camera's sensor. Thanks to one of the replies below, I saw on this page that before API 9 this was a non-issue, as those versions of Android only allowed photos in "portrait" mode. I'm still left with lots of questions about Android's fragmentation, but at least I now understand that the new CameraInfo class didn't replace anything. Nothing is removed as the docs are updated. Thanks!

Upvotes: 2

Views: 527

Answers (2)

David Wasser
David Wasser

Reputation: 95568

You can filter the documentation by API level. Go to http://developer.android.com and select the "reference" section. At the top of the column on the left-hand side it says "Android APIs API level:" followed by a dropdown selection. Set that to "8". Then you will only see stuff available in API level 8.

Upvotes: 4

La bla bla
La bla bla

Reputation: 8708

Check out this link. info about API Level 8 (Android 2.2)

At the bottom you can see there is a section called Camera and camcorder which specifies the changes in that level regarding the camera. Could be that this specific method getCameraInfo() is only available since API 9, but there are ways in API 8 to get the same info using different methods.

Also, here is a direct link to the entire documentation of the Camera object. You can read of all the available methods and their API levels.

Upvotes: 0

Related Questions