NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

check if the JSON MimeType is supported

Open dev-victoria opened this issue 6 months ago • 1 comments

What is it?

  • [x] Bugfix (user facing)
  • [ ] Feature (user facing)
  • [ ] Codebase improvement (dev facing)
  • [ ] Meta improvement to the project (dev facing)

Description of the changes in your PR

If no JSON MIME type is available on the android(old version), use "application/octet-stream" instead, which targets json files one puts on the old device.

Another solution could be to check for Build.VERSION.SDK_INT < Build.VERSION_CODES.Q instead of using the webkit MimeTypes

Since a file of type application/json can still be created locally(by exporting as such), the mime type for the file picker might need to be */* to support both locally exported(as "application/json") and otherwise transferred .json files("application/octet-stream").

Before/After Screenshots/Screen Record

  • Before: API28_unabletoimport

  • After(old & newer Android): API28 API29

Fixes the following issue(s)

  • Fixes #9169

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

dev-victoria avatar Jun 15 '25 01:06 dev-victoria