how to get final/attached resolution for UseCases

114 views
Skip to first unread message

matty

unread,
Jun 29, 2021, 10:15:37 AM6/29/21
to Android CameraX Discussion Group
hi,
so I've been wondering if there is a way to get the Resolution ,
which has been determined by CameraX. You could call it something like a "final resolution".
As a developer using the API i might be interested in this resolution, maybe even before the bindToLifecycle is called.

So i stumbled up on this post on stack overflow:
which uses the method getAttachedSurfaceResolution

Since the function is restricted to Scope.LIBRARY_GROUP, i assume this approach is not recommended,
and i wonder what is the best way to get the resolution?

Greetings,
Matty

Charcoal Chen

unread,
Jun 29, 2021, 9:29:22 PM6/29/21
to Android CameraX Discussion Group, matty
Hi,

Thanks for raising the question.

A new getResolutionInfo() public API was just added in http://android-review.googlesource.com/1727613. It will be included in CameraX's next formal release which should be published in the following days. Please wait for the camera-core 1.1.0-alpha06 and check whether the API fulfills your requirements. 
Reply all
Reply to author
Forward
0 new messages