question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: Cannot "continue" in Android Camera Edit window

See original GitHub issue

Bug Report

Capacitor Version

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 1.2.1 @capacitor/core: 1.2.1 @capacitor/android: 1.2.1 @capacitor/ios: 1.2.1

Installed Dependencies:

@capacitor/cli 1.1.0 @capacitor/android 1.2.1 @capacitor/core 1.1.0 @capacitor/ios 1.2.0

Affected Platform(s)

  • Android
  • iOS
  • Electron
  • Web

Current Behavior

When allowEditing is true in the Camera .getPhoto call, on Android, there is no option to select the edited image. Basically you can only close the edit window and it doesn’t pass the image back to JS.

Expected Behavior

Should work like iOS where you can crop etc and then continue and have the edited image returned.

Sample Code or Sample Application Repo

image000000

Reproduction Steps

      let options: any = {
        quality: 80,
        correctOrientation: true,
        allowEditing: true,
        direction: CameraDirection.Front,
        resultType: CameraResultType.DataUrl
      };

      return Camera.getPhoto(options).then(res => {

        if (typeof res === 'object' && res.dataUrl) resolve(res.dataUrl);
        else reject();

      }).catch(() => reject());

Other Technical Details

npm --version output: 6.10.3

node --version output: v9.4.0

pod --version output (iOS issues only): —

Other Information

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
corysmccommented, Jun 12, 2020

For what it’s worth - this is what I ended up doing:

const image = await Camera.getPhoto({
    quality: 90,
    allowEditing: Capacitor.platform === 'ios',
    direction: CameraDirection.Front,
    source: CameraSource.Prompt,
    resultType: CameraResultType.Base64,
    width: 750
  });

This way Android doesn’t take you to some editing app, but just returns the image. iOS allows simple edits and it is straightforward. Much better experience.

1reaction
benharperscommented, Oct 23, 2019

Isn’t there an open source photo capture/edit library that could be used so that the functionality is consistent or at least usable across platforms? Also the ability to take a photo without leaving the app would eliminate a lot of complexity in terms of restoring state, etc. Relying on the raw android functionality doesn’t seem to provide usability in this case. Even though you can tap auto and maybe continue appears at that point, our testers couldn’t figure that out, which means that it’s unusable as is.

https://github.com/CameraKit/camerakit-android

https://github.com/aminography/ChoosePhotoHelper

https://github.com/gm4s/MediaPickerInstagram

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix the “Unfortunately, Camera Has Stopped” Error ...
1. Restart Your Camera App and Device ... Your Android device might show an error when the camera has been in use for...
Read more >
How to Fix “Unfortunately, Camera Has Stopped” On Android
Method 2: Turn off/ on the Android Device ... Device restart is known to successfully fix several technical glitches. So turn off your...
Read more >
9 Ways to Fix Camera App Crashing or Not Working on ...
Open Settings on your Android phone. · Go to Apps & notifications > See all apps. · Here, scroll and select the Camera...
Read more >
8 Best Ways to Fix Can't Continue Editing Error on Instagram
Instagram not letting you edit photos? Try out these troubleshooting tips to resolve the 'Can't continue editing' error on Instagram.
Read more >
How to Fix Instagram Can't Continue Editing Error
Go to the Play Store (if you use an Android phone) or the App Store (iPhones) and search for Instagram. Make sure the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found