You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@AbdurazaaqMohammed https://github.com/AbdurazaaqMohammed/InjectDocumentsProvider
If I was on your place, in the ReadMe - provider code example - I would've mentioned that it's not a standard one to copy paste, because you clearly grabbed this android:authorities="com.andatsoft.myapk.fwa.MTDataFilesProvider" from the My APK app, but then in the follow up images you show Geode as an example, so I would've made it more consistent.
Samsung also hides the Files app shortcut from the launcher (they replace it with their own junk-y one), you can mention it, along with Xiaomi if you want, since it's a more popular brand.
You can also add a screenshot(s) from your app ;)
BTW, using the Launch button crashes the app, because the package name of my Files app is different than the one you coded and the app is expecting, mine is: com.android.documentsui and it should either launch com.android.documentsui.LauncherActivity or if that fails com.android.documentsui.files.FilesActivity, depending on which activity is not private & exported (varies). I've modded it using MT to remove "google" and now it works here on A.8.1.
There are some systems without the "Files" app, like a A.11 car head unit, so your app will crash there as well, other apps can call/use other file managers, like Root Explorer/Explorer, MT Manager, ZArchiver, etc.... (they let you pick which if you have more than one that can handle the file pick action)
The crash:
FATAL EXCEPTION: main
Process: com.AbdurazaaqMohammed.InjectDocumentsProvider, PID: 19736
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.google.android.documentsui/com.android.documentsui.files.FilesActivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1933)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1616)
at android.app.Activity.startActivityForResult(Activity.java:4497)
at android.app.Activity.startActivityForResult(Activity.java:4455)
at android.app.Activity.startActivity(Activity.java:4816)
at android.app.Activity.startActivity(Activity.java:4784)
at com.AbdurazaaqMohammed.InjectDocumentsProvider.MainActivity.openSystemFilesActivity(MainActivity.java:113)
at com.AbdurazaaqMohammed.InjectDocumentsProvider.MainActivity.lambda$onCreate$1$MainActivity(MainActivity.java:57)
at com.AbdurazaaqMohammed.InjectDocumentsProvider.MainActivity$$ExternalSyntheticLambda1.onClick(Unknown Source:2)
at android.view.View.performClick(View.java:6294)
at android.view.View$PerformClick.run(View.java:24770)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:463)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
When the Files app is disabled or missing and Pick File is pressed:
FATAL EXCEPTION: main
Process: com.AbdurazaaqMohammed.InjectDocumentsProvider, PID: 10428
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.OPEN_DOCUMENT cat=[android.intent.category.OPENABLE] typ=/ (has extras) }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1937)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1616)
at android.app.Activity.startActivityForResult(Activity.java:4497)
at android.app.Activity.startActivityForResult(Activity.java:4455)
at com.AbdurazaaqMohammed.InjectDocumentsProvider.MainActivity.openFilePickerToSelectFile(MainActivity.java:87)
at com.AbdurazaaqMohammed.InjectDocumentsProvider.MainActivity.lambda$onCreate$0$MainActivity(MainActivity.java:61)
at com.AbdurazaaqMohammed.InjectDocumentsProvider.MainActivity$$ExternalSyntheticLambda0.onClick(Unknown Source:2)
at android.view.View.performClick(View.java:6294)
at android.view.View$PerformClick.run(View.java:24770)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:463)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
APK > Open With IDP from a File Manager:
FATAL EXCEPTION: main
Process: com.AbdurazaaqMohammed.InjectDocumentsProvider, PID: 10616
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.AbdurazaaqMohammed.InjectDocumentsProvider/com.AbdurazaaqMohammed.InjectDocumentsProvider.MainActivity}: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.CREATE_DOCUMENT cat=[android.intent.category.OPENABLE] typ=application/vnd.android.package-archive (has extras) }
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:463)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.CREATE_DOCUMENT cat=[android.intent.category.OPENABLE] typ=application/vnd.android.package-archive (has extras) }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1937)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1616)
at android.app.Activity.startActivityForResult(Activity.java:4497)
at android.app.Activity.startActivityForResult(Activity.java:4455)
at com.AbdurazaaqMohammed.InjectDocumentsProvider.MainActivity.openFilePickerToSaveFile(MainActivity.java:112)
at com.AbdurazaaqMohammed.InjectDocumentsProvider.MainActivity.onCreate(MainActivity.java:76)
at android.app.Activity.performCreate(Activity.java:7019)
at android.app.Activity.performCreate(Activity.java:7010)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
... 9 more
When enabling Files and launching IDP from the launcher:
FATAL EXCEPTION: main
Process: com.AbdurazaaqMohammed.InjectDocumentsProvider, PID: 10767
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.AbdurazaaqMohammed.InjectDocumentsProvider/com.AbdurazaaqMohammed.InjectDocumentsProvider.MainActivity}: java.lang.SecurityException: Permission Denial: opening provider l.۠ۗۢ from ProcessRecord{afaa8d 10767:com.AbdurazaaqMohammed.InjectDocumentsProvider/u0a73} (pid=10767, uid=10073) that is not exported from UID 10078
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:463)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.SecurityException: Permission Denial: opening provider l.۠ۗۢ from ProcessRecord{afaa8d 10767:com.AbdurazaaqMohammed.InjectDocumentsProvider/u0a73} (pid=10767, uid=10073) that is not exported from UID 10078
at android.os.Parcel.readException(Parcel.java:2013)
at android.os.Parcel.readException(Parcel.java:1959)
at android.app.IActivityManager$Stub$Proxy.getContentProvider(IActivityManager.java:4760)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:5836)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2526)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1780)
at android.content.ContentResolver.query(ContentResolver.java:738)
at android.content.ContentResolver.query(ContentResolver.java:704)
at android.content.ContentResolver.query(ContentResolver.java:662)
at com.AbdurazaaqMohammed.InjectDocumentsProvider.MainActivity.getOriginalFileName(MainActivity.java:173)
at com.AbdurazaaqMohammed.InjectDocumentsProvider.MainActivity.openFilePickerToSaveFile(MainActivity.java:111)
at com.AbdurazaaqMohammed.InjectDocumentsProvider.MainActivity.onCreate(MainActivity.java:76)
at android.app.Activity.performCreate(Activity.java:7019)
at android.app.Activity.performCreate(Activity.java:7010)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
... 9 more
I hope you understand that this is done on purpose to simulate the (real) cases where and when the Files app is missing and to avoid such crashes in future.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
@AbdurazaaqMohammed
https://github.com/AbdurazaaqMohammed/InjectDocumentsProvider
If I was on your place, in the ReadMe - provider code example - I would've mentioned that it's not a standard one to copy paste, because you clearly grabbed this
android:authorities="com.andatsoft.myapk.fwa.MTDataFilesProvider"
from theMy APK
app, but then in the follow up images you showGeode
as an example, so I would've made it more consistent.Samsung also hides the
Files
app shortcut from the launcher (they replace it with their own junk-y one), you can mention it, along with Xiaomi if you want, since it's a more popular brand.You can also add a screenshot(s) from your app ;)
BTW, using the
Launch
button crashes the app, because the package name of myFiles
app is different than the one you coded and the app is expecting, mine is:com.android.documentsui
and it should either launchcom.android.documentsui.LauncherActivity
or if that failscom.android.documentsui.files.FilesActivity
, depending on which activity is not private & exported (varies). I've modded it using MT to remove "google" and now it works here on A.8.1.There are some systems without the "Files" app, like a A.11 car head unit, so your app will crash there as well, other apps can call/use other file managers, like Root Explorer/Explorer, MT Manager, ZArchiver, etc.... (they let you pick which if you have more than one that can handle the file pick action)
The crash:
FATAL EXCEPTION: main
Process: com.AbdurazaaqMohammed.InjectDocumentsProvider, PID: 19736
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.google.android.documentsui/com.android.documentsui.files.FilesActivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1933)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1616)
at android.app.Activity.startActivityForResult(Activity.java:4497)
at android.app.Activity.startActivityForResult(Activity.java:4455)
at android.app.Activity.startActivity(Activity.java:4816)
at android.app.Activity.startActivity(Activity.java:4784)
at com.AbdurazaaqMohammed.InjectDocumentsProvider.MainActivity.openSystemFilesActivity(MainActivity.java:113)
at com.AbdurazaaqMohammed.InjectDocumentsProvider.MainActivity.lambda$onCreate$1$MainActivity(MainActivity.java:57)
at com.AbdurazaaqMohammed.InjectDocumentsProvider.MainActivity$$ExternalSyntheticLambda1.onClick(Unknown Source:2)
at android.view.View.performClick(View.java:6294)
at android.view.View$PerformClick.run(View.java:24770)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:463)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Beta Was this translation helpful? Give feedback.
All reactions