Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
mobile_scanner
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Navaron Bracke
2022-11-22 08:53:51 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f903f310cecdd94ab20899cbc437a92fe8f19f0b
f903f310
1 parent
8f598135
set pending method call result
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScanner.kt
android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScanner.kt
View file @
f903f31
...
...
@@ -85,6 +85,12 @@ class MobileScanner(
* Request camera permissions.
*/
fun requestPermission(result: MethodChannel.Result) {
if(pendingPermissionResult != null) {
return
}
pendingPermissionResult = result
val permissions = arrayOf(Manifest.permission.CAMERA)
ActivityCompat.requestPermissions(activity, permissions, REQUEST_CODE)
}
...
...
Please
register
or
login
to post a comment