Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera is not getting dismissed on navigation change in iOS #2302

Open
anusha-kaparapu opened this issue Jan 23, 2025 · 0 comments
Open

Camera is not getting dismissed on navigation change in iOS #2302

anusha-kaparapu opened this issue Jan 23, 2025 · 0 comments

Comments

@anusha-kaparapu
Copy link

Bug Report

Plugin(s)

@capacitor/camera

Capacitor Version

"@capacitor/app": "^6.0.0",
"@capacitor/camera": "^6.0.0"

PASTE OUTPUT HERE

Platform(s)

iOS

Current Behavior

The camera is opened using below method.
Camera.getPhoto({
quality: 50,
allowEditing: false,
resultType: CameraResultType.Base64,
source: CameraSource.Camera
});
We have a push notification functionality implemented in our application. At this moment when user taps on PN while is camera screen, the navigation change is not getting detected by camera plugin in iOS hence the camera still displaying.

Expected Behavior

The camera plugin has to detect navigation changes and redirect user to respective screen instead of not dismissing the camera. (Similar to Android behaviour)

Code Reproduction

Camera opening logic:
const image = await Camera.getPhoto({
quality: 50,
allowEditing: false,
resultType: CameraResultType.Base64,
source: CameraSource.Camera
});

Navigation logic happening on tap of Push notification:

import { Router } from '@angular/router';

this.router.navigate(['tabs/trip-list/trip-details', headerTripId]);

Other Technical Details

Additional Context

However its working in android, only problem with iOS. Is this a limitation of the plugin behaviour ? or can be solved programatically ?
If yes, please provide code snippet of the solution.

This is a priority for us, as we are moving to production. Please reply ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants