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
ipcjs
2022-09-08 00:46:53 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2f3b9ada2a5517cb3f4e7c67d4c77e5957fdb3c6
2f3b9ada
1 parent
de01170d
Fix the error of requestCode value range.
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScanner.kt
example/android/app/src/main/AndroidManifest.xml
example/android/app/src/main/kotlin/dev/steenbakker/mobile_scanner_example/MainActivity.kt
android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScanner.kt
View file @
2f3b9ad
...
...
@@ -29,7 +29,11 @@ import java.io.File
class MobileScanner(private val activity: Activity, private val textureRegistry: TextureRegistry)
: MethodChannel.MethodCallHandler, EventChannel.StreamHandler, PluginRegistry.RequestPermissionsResultListener {
companion object {
private const val REQUEST_CODE = 22022022
/**
* When the application's activity is [androidx.fragment.app.FragmentActivity], requestCode can only use the lower 16 bits.
* @see androidx.fragment.app.FragmentActivity.validateRequestPermissionsRequestCode
*/
private const val REQUEST_CODE = 0x0786
private val TAG = MobileScanner::class.java.simpleName
}
...
...
example/android/app/src/main/AndroidManifest.xml
View file @
2f3b9ad
...
...
@@ -5,7 +5,7 @@
android:label=
"mobile_scanner_example"
android:icon=
"@mipmap/ic_launcher"
>
<activity
android:name=
"
io.flutter.embedding.android.Flutter
Activity"
android:name=
"
.Main
Activity"
android:exported=
"true"
android:launchMode=
"singleTop"
android:theme=
"@style/LaunchTheme"
...
...
example/android/app/src/main/kotlin/dev/steenbakker/mobile_scanner_example/MainActivity.kt
View file @
2f3b9ad
package dev.steenbakker.mobile_scanner_example
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.android.Flutter
Fragment
Activity
class MainActivity
: Flutter
Activity() {
class MainActivity
: FlutterFragment
Activity() {
}
...
...
Please
register
or
login
to post a comment