MichielProost / Perfect-Plate

This Android application allows cheffs around the world to create, review and discover new recipes. Users can gain experience and level up in this app by completing challenges like creating a certain amount of recipes.
1 stars 2 forks source link

Fix suspected Camera/Gallery permissions #32

Closed Nuytemans-Dieter closed 3 years ago

Nuytemans-Dieter commented 3 years ago

This is required to use with the image picker: https://pub.dev/packages/permission_handler. List of permissions here. Also, see this question

Nuytemans-Dieter commented 3 years ago

Duplicate in Flutter repo: https://github.com/flutter/flutter/issues/29422

MichielProost commented 3 years ago

Should be fixed by tonight. Working on it.

MichielProost commented 3 years ago

Help needed from @Nuytemans-Dieter

This functionality should be tested by another account. For some reason, the "permission screen" does not appear anymore when my account is used. Try to add a profile picture. Since your "camera permission" is set to False, you should see a "permission screen" asking you to allow camera access.

Nuytemans-Dieter commented 3 years ago

Help needed from @Nuytemans-Dieter

This functionality should be tested by another account. For some reason, the "permission screen" does not appear anymore when my account is used. Try to add a profile picture. Since your "camera permission" is set to False, you should see a "permission screen" asking you to allow camera access.

Everything worked out, right?

MichielProost commented 3 years ago

Yes.

For your information. There are a bunch of states the camera permission can be in: undetermined, granted, restricted,... I've simplified this to 2 states: 1) The user has allowed access. 2) All other states.

This allows me to ask for permission when the camera state is set to False. And to allow permission when the state is set to True.

I'll close the issue, since everything works as it's supposed to.