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
2024-06-17 16:45:54 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
43e6cb5939f3b9729e0023beab30d80574de41df
43e6cb59
1 parent
dbd52508
fix error from stale build file
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScannerPermissionsListener.kt
android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScannerPermissionsListener.kt
View file @
43e6cb5
package dev.steenbakker.mobile_scanner
import android.content.pm.PackageManager
import dev.steenbakker.mobile_scanner.objects.MobileScannerErrorCodes
import io.flutter.plugin.common.PluginRegistry
/**
...
...
@@ -29,11 +30,9 @@ internal class MobileScannerPermissionsListener(
// grantResults could be empty if the permissions request with the user is interrupted
// https://developer.android.com/reference/android/app/Activity#onRequestPermissionsResult(int,%20java.lang.String[],%20int[])
if (grantResults.isEmpty() || grantResults[0] != PackageManager.PERMISSION_GRANTED) {
resultCallback.onResult(
MobileScannerPermissions.CAMERA_ACCESS_DENIED,
MobileScannerPermissions.CAMERA_ACCESS_DENIED_MESSAGE)
resultCallback.onResult(MobileScannerErrorCodes.CAMERA_ACCESS_DENIED)
} else {
resultCallback.onResult(null
, null
)
resultCallback.onResult(null)
}
return true
...
...
Please
register
or
login
to post a comment