GithubHelp home page GithubHelp logo

Comments (5)

Piasy avatar Piasy commented on June 21, 2024

PR is welcome!

from bigimageviewer.

stephenchowxingxing avatar stephenchowxingxing commented on June 21, 2024

Redmi K40S,Android 12, image 加载onSuccess后:/data/user/0/com.example.testapp/cache/1670055364173_1,
使用saveImageIntoGallery时, 报错:

java.lang.IllegalArgumentException: Unsupported MIME type image/jpg
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:2193)
at android.content.ContentResolver.insert(ContentResolver.java:2155)
at com.github.piasy.biv.view.BigImageView.saveImageIntoGallery(BigImageView.java:335)

大佬,这是bug, 还是我使用错误?

from bigimageviewer.

Piasy avatar Piasy commented on June 21, 2024

应该还是新的 Android 系统存储权限相关的兼容性问题,我抽空看看更新一下吧

from bigimageviewer.

stephenchowxingxing avatar stephenchowxingxing commented on June 21, 2024

将mCurrentImageFile替换成外部私有目录下的图片(xxx.png),把saveImageIntoGallery中的方法拿出来使用并没有什么错误。但是在demo中直接使用saveImageIntoGallery方法就出错.

targetSdkVersion 29 没问题, targetSdk 32 报错。

from bigimageviewer.

Piasy avatar Piasy commented on June 21, 2024

@WonderfulHotel 我在 API 32 的模拟器,以及 API 31 的小米真机上测试 demo 的 LongImageActivity 里的 saveImageIntoGallery,项目设置 target API 33,都没有问题。

from bigimageviewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.