{"action":"created","issue":{"url":"https://api.github.com/repos/googlesamples/android-vision/issues/21","labels_url":"https://api.github.com/repos/googlesamples/android-vision/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/googlesamples/android-vision/issues/21/comments","events_url":"https://api.github.com/repos/googlesamples/android-vision/issues/21/events","html_url":"https://github.com/googlesamples/android-vision/issues/21","id":104677680,"number":21,"title":"Set preview size based on camera capabilities","user":{"login":"omares","id":1375307,"avatar_url":"https://avatars.githubusercontent.com/u/1375307?v=3","gravatar_id":"","url":"https://api.github.com/users/omares","html_url":"https://github.com/omares","followers_url":"https://api.github.com/users/omares/followers","following_url":"https://api.github.com/users/omares/following{/other_user}","gists_url":"https://api.github.com/users/omares/gists{/gist_id}","starred_url":"https://api.github.com/users/omares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omares/subscriptions","organizations_url":"https://api.github.com/users/omares/orgs","repos_url":"https://api.github.com/users/omares/repos","events_url":"https://api.github.com/users/omares/events{/privacy}","received_events_url":"https://api.github.com/users/omares/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-09-03T12:15:07Z","updated_at":"2015-09-29T21:03:36Z","closed_at":null,"body":"I would like to set the preview size depending on the camera capabilities. As example always use the middle size of the supported sizes. Unfortunately the size information is only available when the camera object is present, in the case of android-vision this is after `CameraSource.Builder.Build()` was called. As the builder requires the parameters before calling build you end up with a dead end.\r\n\r\nSetting the preview size directly on the camera, after the the camera source class was build, currently leads to errors as the expected byte sizes differ.\r\n\r\nIs there currently any possibility/hack to solve the issue above?"},"comment":{"url":"https://api.github.com/repos/googlesamples/android-vision/issues/comments/144190981","html_url":"https://github.com/googlesamples/android-vision/issues/21#issuecomment-144190981","issue_url":"https://api.github.com/repos/googlesamples/android-vision/issues/21","id":144190981,"user":{"login":"omares","id":1375307,"avatar_url":"https://avatars.githubusercontent.com/u/1375307?v=3","gravatar_id":"","url":"https://api.github.com/users/omares","html_url":"https://github.com/omares","followers_url":"https://api.github.com/users/omares/followers","following_url":"https://api.github.com/users/omares/following{/other_user}","gists_url":"https://api.github.com/users/omares/gists{/gist_id}","starred_url":"https://api.github.com/users/omares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omares/subscriptions","organizations_url":"https://api.github.com/users/omares/orgs","repos_url":"https://api.github.com/users/omares/repos","events_url":"https://api.github.com/users/omares/events{/privacy}","received_events_url":"https://api.github.com/users/omares/received_events","type":"User","site_admin":false},"created_at":"2015-09-29T21:03:36Z","updated_at":"2015-09-29T21:03:36Z","body":"We are using Xamarin, and as of right now they do not provide any bindings for the newest google play services. I will update to the latest services as soon as these are available but this will take a few weeks and i want to ship the new scanner as fast as possible.\r\n\r\nThanks a lot for the insights! I created a custom CameraSource with a configuration hook that enables the user to inject custom configuration. :) As soon as the code is ready i will share it here."}}