Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses camera focus/zoom reliability issues across iOS and Android in the DIPS.Mobile.UI camera APIs (barcode scanning + image capture), with a small SDK bump and changelog entry to ship the fixes.
Changes:
- iOS: ensure continuous autofocus/auto-exposure is enabled on session start and re-engaged after zoom changes; restore continuous AF after tap-to-focus one-shot completes.
- Android: re-engage autofocus after zoom changes; fix tap-to-focus coordinate mapping so the metering point and indicator align with the tapped location.
- Repo metadata: bump .NET SDK version and add a patch changelog entry.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/library/DIPS.Mobile.UI/API/Camera/Shared/iOS/CameraSession.cs |
Enables continuous AF/AE on startup and after slider-based zoom changes. |
src/library/DIPS.Mobile.UI/API/Camera/Shared/Android/CameraFragment.cs |
Triggers a focus/metering action after pinch-to-zoom to re-engage autofocus. |
src/library/DIPS.Mobile.UI/API/Camera/Preview/iOS/PreviewView.cs |
Re-engages continuous AF after pinch end; restores continuous AF/AE after tap-to-focus via KVO observer. |
src/library/DIPS.Mobile.UI/API/Camera/Preview/CameraPreview.cs |
Unifies focus-indicator Y-offset calculation across platforms using PreviewView.TranslationY. |
src/library/DIPS.Mobile.UI/API/Camera/Preview/Android/PreviewView/PreviewViewHandler.cs |
Uses view-relative touch coordinates (GetX/GetY) for tap-to-focus. |
global.json |
Bumps pinned SDK from 10.0.100 to 10.0.200. |
CHANGELOG.md |
Adds 56.0.3 entry describing the camera fixes. |
…gment.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/DIPSAS/DIPS.Mobile.UI/sessions/40a189d9-09ba-4a37-924a-0cc6ddab5098 Co-authored-by: Vetle444 <35739538+Vetle444@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Fixes three related camera issues affecting barcode scanning and image capture:
1. iOS: Focus locks on startup and never re-adjusts
SetContinuousAutoFocus()that enablesContinuousAutoFocus+ContinuousAutoExposureon the capture device after session configuration.2. iOS: Tap-to-focus permanently locks focus
SetFocusPoint()setAVCaptureFocusMode.AutoFocus(one-shot) and never returned to continuous mode.adjustingFocusKVO property and restoresContinuousAutoFocusonce the one-shot focus completes.3. Zoom does not trigger refocus (both platforms)
ContinuousAutoFocuson pinch gesture end and after slider zoom changes.FocusMeteringActionafter pinch-to-zoom to re-engage autofocus.4. Android: Tap-to-focus indicator appears at wrong position
TouchScaleListenerwas passinge.RawX/e.RawY(screen-absolute coordinates) instead ofe.GetX()/e.GetY()(view-relative coordinates), causing both the metering point and indicator circle to be offset./ 1.25fapproximation instead of accounting forPreviewView.TranslationY. Unified with iOS to use the same correct formula.