Skip to content

check if the JSON MimeType is supported #12356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

dev-victoria
Copy link
Contributor

@dev-victoria dev-victoria commented Jun 15, 2025

What is it?

  • 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 API29
Before API28 API29

Fixes the following issue(s)

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

@github-actions github-actions bot added the size/small PRs with less than 50 changed lines label Jun 15, 2025
@ShareASmile ShareASmile added bug Issue is related to a bug import/export anything related to Import/export of data, subscriptions labels Jun 15, 2025
Copy link

@dev-victoria dev-victoria marked this pull request as ready for review June 16, 2025 15:24
@ShareASmile ShareASmile added the ready for review Most of the work is done, PR is now ready for a review label Jun 18, 2025
Copy link
Member

@Isira-Seneviratne Isira-Seneviratne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@Isira-Seneviratne Isira-Seneviratne merged commit 2dd11f7 into TeamNewPipe:dev Jul 4, 2025
5 of 6 checks passed
@ShareASmile ShareASmile removed the ready for review Most of the work is done, PR is now ready for a review label Jul 4, 2025
whistlingwoods pushed a commit to whistlingwoods/FoxPipe that referenced this pull request Jul 27, 2025
…ting-oldandroid

check if the JSON MimeType is supported
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug import/export anything related to Import/export of data, subscriptions size/small PRs with less than 50 changed lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import subscription no prompt for storage permission bug
3 participants