For the More Curious: Deprecation in Android

In Chapter 19, when you were setting the camera’s preview size, we directed you to use a deprecated method and a deprecated constant. In this chapter, you used deprecated methods A curious reader may wonder: What is up with that?

What is up, indeed. Let’s start with what it means when a part of an API is deprecated. If something is deprecated, that means that it is no longer necessary. Sometimes deprecation occurs because the operation it performed is no longer required. That is the case with the SurfaceHolder.setType(int) method and the SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS constant that you added in Chapter 19. On older versions of Android, SurfaceHolder needed to be configured appropriately ...

Get Android Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.