[go: nahoru, domu]

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

[coroutine] dialog box didnt show on Android R #137

Open
yogithesymbian opened this issue Nov 30, 2021 · 1 comment
Open

[coroutine] dialog box didnt show on Android R #137

yogithesymbian opened this issue Nov 30, 2021 · 1 comment

Comments

@yogithesymbian
Copy link
GlobalScope.launch {


            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
                Log.d(TAG_LOG, "hello android R")
                val permissionResult = TedPermission.create()
                    .setPermissions(
                        Manifest.permission.MANAGE_EXTERNAL_STORAGE
                    )
                    .checkGranted()
                Log.d(TAG_LOG, "hello $permissionResult")
                if (!permissionResult) {
                    // request
                    Log.d(TAG_LOG, "hello request $permissionResult") // this #line# the dialog didnt show
                } else {
                    Log.d(TAG_LOG, "hello granted $permissionResult")
                }
            } else {
                Log.d(TAG_LOG, "hello android min R")
                val permissionResult = TedPermission.create()
                    .setPermissions(
                        Manifest.permission.READ_EXTERNAL_STORAGE,
                        Manifest.permission.WRITE_EXTERNAL_STORAGE
                    )
                    .checkGranted()
                Log.d(TAG_LOG, "hello $permissionResult")
                if (!permissionResult) {
                    // request
                    Log.d(TAG_LOG, "hello request $permissionResult")
                } else {
                    Log.d(TAG_LOG, "hello granted $permissionResult")
                }

            }
        }

why dialog bo didn appears just throw the log on // this #line#

@kocakurt75
Copy link

Teşekkürler

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