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

Photo sharing permission bug #53

Open
milkaman opened this issue Feb 20, 2018 · 3 comments
Open

Photo sharing permission bug #53

milkaman opened this issue Feb 20, 2018 · 3 comments

Comments

@milkaman
Copy link

We're integration LP into our app, and faced a bug while using Photo sharing feature.
If we press "Gallery" button and Permission dialog appeared, then we'll press "Allow" , ConversationFragment.onRequestPermissionsResult() is called with grantResults={0, -1}

public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        switch(requestCode) {
        case 1:
            LPMobileLog.d(TAG, "permission result = " + grantResults[0]);
            if(this.checkAllPermissionsGranted(grantResults)) {  //returns false because of {0, -1}
                this.startGallery();
                return;
            }
            break;
        case 2:
            ...
        }
...

As a result menu with "Gallery" and "Camera" collapsed and Gallery won't be opened.

This is happening because of targeting Android O and some changes about READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE: https://developer.android.com/about/versions/oreo/android-8.0-changes.html#rmp

We use next parameters:
targetSdk : 26,
compileSdk : 26,
buildTools : '26.0.1'

@trosel
Copy link

trosel commented Feb 20, 2018

@milkaman Have you updated your manifest file to include photo sharing permissions?

@milkaman
Copy link
Author

@WildYorkies Sure
But anyway Android replaced automatically with:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />

More information about it here: https://developer.android.com/guide/topics/manifest/uses-permission-element.html

@trosel
Copy link

trosel commented Feb 22, 2018

@milkaman I would recommend cross posting this issue here https://github.com/LivePersonInc/developers-community/issues

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

No branches or pull requests

2 participants