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

[OTA Event Status] Permission not granted error (Harmony OS 3.0.0) #118

Open
ogak-github opened this issue Jul 5, 2024 · 3 comments
Open

Comments

@ogak-github
Copy link

I got the error permission not granted before starting the OtaUpdate()

I tried in Emulator android API 34 and other different brand smartphone with Android 14 no issues, but with Harmony OS 3.0.0 permission not granted.

D/FLUTTER OTA(29480): STREAM CLOSED D/FLUTTER OTA(29480): STREAM OPENED D/FLUTTER OTA(29480): REQUEST PERMISSIONS RESULT RECEIVED E/FLUTTER OTA(29480): ERROR: Permission not granted

@rafadompas
Copy link

I have the same problem. Permission not granted with xiaomi and huawai.

Any idea?

@ogak-github
Copy link
Author

I forgot why this issue appear,
Try check storage permission status before starting ota update

 Future<void> requestPermissions() async {
    var status = await Permission.storage.status;
    if (!status.isGranted) {
      await Permission.storage.request();
    }
  }

Let me know if the issue fixed. Then I mark this issue as closed.

@rafadompas
Copy link

I do it but send the same error

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