API method rename (createSurfaceProvider to getSurfaceProvider)

211 views
Skip to first unread message

James Fung

unread,
Sep 23, 2020, 5:55:15 PM9/23/20
to Android CameraX Discussion Group
Hi everyone,

CameraView-1.0.0 Alpha16 includes an API change that renames a method.  Applications will need to be updated to use the new method name. 

Specifically, createSurfaceProvider() is renamed to getSurfaceProvider().  Additionally, the same Preview.SurfaceProvider instance will be returned each time it's called, instead of returning a new instance every time.

Usages like:
Preview.SurfaceProvider surfaceProvider = previewView.createSurfaceProvider(); 

should be replaced with):
Preview.SurfaceProvider surfaceProvider = previewView.getSurfaceProvider();

CameraView is in Alpha but widely used and we appreciate your patience as we stabilize the API.  Thanks!
Reply all
Reply to author
Forward
0 new messages