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

Add Permissions Support #31

Open
2 of 3 tasks
MohamedRejeb opened this issue Sep 28, 2023 · 1 comment
Open
2 of 3 tasks

Add Permissions Support #31

MohamedRejeb opened this issue Sep 28, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@MohamedRejeb
Copy link
Owner

MohamedRejeb commented Sep 28, 2023

  • Android
  • iOS
  • Web

AFAIK permissions are handled automatically in Desktop so we don't need to worry about it.

@MohamedRejeb MohamedRejeb added the enhancement New feature or request label Sep 28, 2023
@HLCaptain
Copy link

In the current desktop implementation, desktop permissions are automatically denied, so it does not actually let the OS handle the permission (it should be Granted instead of Denied automatically).

Current implementation looks like this:

@ExperimentalPermissionsApi
@Stable
internal class MutablePermissionStateImpl(
    override val permission: Permission,
) : MutablePermissionState {

    override var status: PermissionStatus by mutableStateOf(getPermissionStatus())

    override fun launchPermissionRequest() {}

    override fun openAppSettings() {}

    override fun refreshPermissionStatus() {}

    private fun getPermissionStatus(): PermissionStatus {
        return PermissionStatus.Denied(false) // This should be PermissionStatus.Granted
    }
}

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

No branches or pull requests

2 participants