Open nafre opened 4 years ago
@nafre Have you tried to add android:requestLegacyExternalStorage="true"
?
<application
android:name="com.tns.NativeScriptApplication"
android:allowBackup="true"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:requestLegacyExternalStorage="true">
I just tried the method above and it worked. Thanks.
Hi, I had problems doing this procedure. The images are displayed, but when I try to record a video this error appears.
System.err: An uncaught Exception occurred on "main" thread. System.err: MIME type video/mp4 cannot be inserted into content://media/external/images/media; expected MIME type under image/* System.err: System.err: StackTrace: System.err: java.lang.IllegalArgumentException: MIME type video/mp4 cannot be inserted into content://media/external/images/media; expected MIME type under image/* System.err: at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:170) System.err: at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140) System.err: at android.content.ContentProviderProxy.insert(ContentProviderNative.java:481) System.err: at android.content.ContentResolver.insert(ContentResolver.java:1835) System.err: at com.vincent.filepicker.adapter.VideoPickAdapter$1.onClick(VideoPickAdapter.java:96) System.err: at android.view.View.performClick(View.java:7870) System.err: at android.view.View.performClickInternal(View.java:7839) System.err: at android.view.View.access$3600(View.java:886) System.err: at android.view.View$PerformClick.run(View.java:29363) System.err: at android.os.Handler.handleCallback(Handler.java:883) System.err: at android.os.Handler.dispatchMessage(Handler.java:100) System.err: at android.os.Looper.loop(Looper.java:237) System.err: at android.app.ActivityThread.main(ActivityThread.java:7857) System.err: at java.lang.reflect.Method.invoke(Native Method) System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)
if remove android:requestLegacyExternalStorage="true"
I can open the video recorder, but the images do not showing
I'm having the same problem as @hugops. Has anyone figured out a workaround?
I fork the android project https://github.com/hugops/MultiType-FilePicker, and fixed the bugs. After i generate the aar lib and replace the file in node-modules path (node_modules/nativescript-mediafilepicker/platforms/android/MultiTypeFilePicker-release.aar) to work in my project
But in android 11 sdk 30 not works
Android 11 SDK 30 still does not list files in Documents or Downloads folder.
Name: pixel_5_api_30 CPU/ABI: Google APIs Intel Atom (x86) Path: C:\Users\user.android\avd\Pixel_5_API_30.avd Target: google_apis [Google APIs] (API level 30) image.androidVersion.api: 30
I have the same error with SDK 30
Describe the bug On Android 10 (API 29), I ran the demo from this repo and the results for the ImagePicker is as shown in the picture below. I have provided the app with all the permissions needed. As you can see, the images are not showing up.
To Reproduce Steps to reproduce the behavior: Try running this plugin on Samsung 10 or API level 29
Expected behavior The application should work as it should by showing the gallery and the camera as well.
NativeScript Info(please run
tns info
):Sample Code(please provide minimum code to reproduce problem): The code is from the demo which can be found in this repository.