Skip to content

check if the JSON MimeType is supported#12356

Merged
Isira-Seneviratne merged 2 commits intoTeamNewPipe:devfrom
dev-victoria:fix-json-importing-oldandroid
Jul 4, 2025
Merged

check if the JSON MimeType is supported#12356
Isira-Seneviratne merged 2 commits intoTeamNewPipe:devfrom
dev-victoria:fix-json-importing-oldandroid

Conversation

@dev-victoria
Copy link
Copy Markdown
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 and subscriptions labels Jun 15, 2025
@sonarqubecloud
Copy link
Copy Markdown

@dev-victoria dev-victoria marked this pull request as ready for review June 16, 2025 15:24
Comment thread app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt Outdated
@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
Copy Markdown
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 and 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