-
Notifications
You must be signed in to change notification settings - Fork 9.8k
add runtime permission requests for external storage and camera #424
Conversation
…requesting image from Camera on android:
Made suggested changes - the plugin now correctly registers a listener for permission requests, and launches the camera if that is successful. |
activity.startActivityForResult( | ||
cameraModule.getCameraIntent(activity), REQUEST_CODE_CAMERA); | ||
} else { | ||
pendingResult = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this send an error back to the Dart side if the permissions were not granted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done - also made sure the example was handling the error
@@ -29,12 +34,14 @@ | |||
import java.util.List; | |||
|
|||
/** Location Plugin */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(optional since this was here before) Would you mind fixing (or removing) this incorrect doc string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.. maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
going to wait on #425 to fix the deprecations |
I restarted the tests now that #425 has landed |
Ah, nice one! Literally ran into this issue now myself... Thanks for patching it! :) |
One thing I forgot to mention: You should probably increase the version number in the pubspec, add an entry to the changelog and push the new version to pub. |
* commit 'a404fbfd4842b51b57bc0c6298604cf5674e2c02': (40 commits) Update README.md (flutter#430) Updated to 0.5.0 (flutter#428) AdSizes for AdMob banner ads (flutter#402) bump minor version and add changelog entry (flutter#427) add fetchProvidersForEmail wrapper (flutter#410) Incremental Build Script (flutter#422) add runtime permission requests for external storage and camera (flutter#424) Fix Dart 2 type error and deprecation (flutter#425) Fix a Dart 2 runtime cast failure in firebase_database test (flutter#419) Fixed deprecation warnings (flutter#420) Fix Dart 2 runtime error in the camera plugin (flutter#417) Always use the latest Flutter available (flutter#415) Spelling (flutter#411) Configure Flutter CI (flutter#383) Set SDK constraints to match Flutter beta (flutter#412) Remove Gradle artifacts from repo (flutter#414) Google maps plugin stub (flutter#405) Allow null document snapshot data when document does not exist (flutter#406) Fix new formatting errors (flutter#408) Fix url_launcher for iOS <10 (flutter#407) ...
Adds runtime permission requests for image_picker when image source is set to camera on Android.
partially fixes flutter/flutter#13921