Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request codes must be unique. File picker=3, Folder picker=0, Storage access=0, Create file=4 #115

Closed
rrsaikat opened this issue Apr 6, 2023 · 1 comment

Comments

@rrsaikat
Copy link

rrsaikat commented Apr 6, 2023

Library version: 1.5.4
OS version: [Android 13]
Device model: [Samsung Galaxy A33 5G]

Describe the bug
Works into other devices with OS version 13, but got this error into latest samsung devices only.

To Reproduce
[Explain the steps to reproduce]

Stacktrace
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myApp/com.example.myApp.ui.MainActivity}: java.lang.IllegalArgumentException: Request codes must be unique. File picker=3, Folder picker=0, Storage access=0, Create file=4
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4169)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4325)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8757)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

@anggrayudi
Copy link
Owner

Folder picker=0, Storage access=0

Both of them use the same request code. Make them unique/different:

storageHelper.storage.requestCodeFolderPicker = 1
storageHelper.storage.requestCodeStorageAccess = 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants