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

Android 13 not able to take screenshot #254

Closed
3 tasks done
andre-sonect opened this issue Jan 30, 2024 · 2 comments · Fixed by #256
Closed
3 tasks done

Android 13 not able to take screenshot #254

andre-sonect opened this issue Jan 30, 2024 · 2 comments · Fixed by #256
Labels
Android Affects google devices running Android bug Something isn't working iOS Affects apple devices using iOS

Comments

@andre-sonect
Copy link

andre-sonect commented Jan 30, 2024

Requirements:

Please go through this checklist before opening a new issue

Environment

Please provide the following information about your environment:

  1. Development OS: Mac
  2. Device OS & Version: Android OS version (13) or iOS version (17)
  3. Version: ViroReact 2.3.0 and React Native 0.67.5
  4. Device(s): OnePlus 8

Description

When using _takeScreenshot on Android it will always fail while working fine on iOS. I suspect it has something to do with the storage permissions but can't really pinpoint to that since I get as a response not success and errorCode 1.

Reproducible Demo

if (arNavigator.current) {
        var timestamp = Date.now();
        arNavigator.current
          ._takeScreenshot('ar_photo_' + timestamp, true)
          .then(retDict => {
            if (!retDict.success) {
              if (retDict.errorCode === 1) {
                if (Platform.OS === 'ios') {
                  setPhotoLibraryPermissionError(true);
                }
                return;
              }
            }
            navigation.push('PhotoProcess', {
              uri: 'file://' + retDict.url,
              videoObj,
            });
          })
          .catch(error => {
            console.log(error);
          });
      }
Copy link

linear bot commented Jan 30, 2024

@robertjcolley robertjcolley added Android Affects google devices running Android bug Something isn't working labels Jan 31, 2024
@robertjcolley
Copy link
Contributor

robertjcolley commented Feb 2, 2024

Reproduced on iOS as well See here!

@robertjcolley robertjcolley added the iOS Affects apple devices using iOS label Feb 2, 2024
@robertjcolley robertjcolley linked a pull request Feb 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Affects google devices running Android bug Something isn't working iOS Affects apple devices using iOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants