Cannot compress to data directory
See original GitHub issueCannot compress to ContextCompat.getDataDir(context) to not ask storage permission. In version 1.0.1 it worked without problems. Now it crashes:
java.lang.IllegalArgumentException: Primary directory (invalid) not allowed for content://media/external_primary/video/media; allowed directories are [DCIM, Movies, Pictures]
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:172)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
at android.content.ContentProviderProxy.insert(ContentProviderNative.java:557)
at android.content.ContentResolver.insert(ContentResolver.java:2218)
at android.content.ContentResolver.insert(ContentResolver.java:2173)
at com.abedelazizshe.lightcompressorlibrary.VideoCompressor.saveVideoFile(VideoCompressor.kt:179)
at com.abedelazizshe.lightcompressorlibrary.VideoCompressor.access$saveVideoFile(VideoCompressor.kt:24)
at com.abedelazizshe.lightcompressorlibrary.VideoCompressor$doVideoCompression$1.invokeSuspend(VideoCompressor.kt:99)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:233)
at android.os.Looper.loop(Looper.java:344)
at android.app.ActivityThread.main(ActivityThread.java:8191)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
If you can't compress a file or folder on Mac - Apple Support
If you can't compress a file or folder on Mac · On your Mac, select the item, then choose File > Get Info,...
Read more >Why can't I compress a folder? | Finddiffer.com
If you can't compress your files and folders, check the permissions settings for those items. If permissions aren't correct, you might not be...
Read more >Cannot Compress Files - Microsoft Community
Hi,. I am not able to send a folder full of .oog audio files (297mb total) to be compressed by righting clicking &...
Read more >The compression cannot be performed because the path to ...
The compression cannot be performed because the path to the file or directory 'Application Data' is too long. Is there any way to...
Read more >I cannot compress files on an NTFS partition. - ITPro Today
the cause is normally that the cluster size of the NTFS partition is greater than 4096. To check the cluster size of your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Device Name ; Poco F1 Android 10 It only compress below 1min video & video also not get played What is the max size of the video that can be compressed? & for 1Gb Video how can we decrease the compression time?