ionic-team / capacitor-plugins

Official plugins for Capacitor ⚡️
512 stars 581 forks source link

capacitor/camera plugin if we go back to the Home Screen and tap again our app icon in Home Screen it is not showing the camera screen #1983

Closed vamsi3293 closed 8 months ago

vamsi3293 commented 8 months ago

Hi Team,

After opening camera, if we go back to the Home Screen and tap again our app icon in Home Screen it is not showing the camera screen instead it showing last navigated screen in android but in iOS it is working fine. May I know how to handle this.

Thanks Vamsi

jcesarmobile commented 8 months ago

Capacitor apps have android:launchMode="singleTask" by default. Camera plugin launches an intent to the Camera app, so it shows the Camera app on top of your own app. But if you open your app from the icon, the icon launches your app again and closes any pending intent screens such as Camera. You can try changing singleTask to something else, but then you might have problems with push/local notifications https://developer.android.com/guide/topics/manifest/activity-element

ionitron-bot[bot] commented 7 months ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.