Tiim / Android-Markdown-Widget

Small widget app to display a markdown file on the home screen
GNU General Public License v3.0
83 stars 10 forks source link

Implement workaround for issue #14 #15

Closed daschfg closed 10 months ago

daschfg commented 11 months ago

Fixes #14.

Older Android SDKs don't implement MIME type "text/markdown". This leads to markdown files not being available for selection.

This workaround checks if "text/markdown" is a known MIME type. Otherwise it will fall back to the broader "*/*". This way, functionality for already working versions is not altered.

Possible issue with this workaround: Instead of not being able to select files, it is now possible to select any file regardless of file type. This only affects devices, where "text/markdown" is not known.

I tested it successfully on Android 8 ("text/markdown" not known) and Android 12 ("text/markdown" known).

Tiim commented 10 months ago

Thank you very much for the contribution! ✨