Share feature: Ability to specify the mime type for Android files
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- android, java, javascript
- 領域
- mobile
調査の方向性
Share プラグインの SharePlugin.java と、issue に示されている ShareOptions API から始めます。現在の MIME 推測とフォールバック動作を、ファイルごとの MIME タイプまたはデフォルト MIME タイプに対して要求されているオプションと比較します。拡張子が認識されないファイルに対して、明示的に指定されたタイプを Android の共有で使用できるようになれば完了です。報告されている WhatsApp のケースも含みます。
索引モデルが issue の本文から書いたものです。
説明
Feature Request
Plugin
share
Description
The app I am working on has an uncommon file extension, and android.webkit.MimeTypeMap quite reasonably does not know what it should map to. Unfortunately, some apps (WhatsApp for instance) do not seem to respect sharing files of type */* and the file I wish to share is being discarded making a rather useless text-only share.
Platform(s)
Android
Preferred Solution
I would like some way to be able to include a more accurate filetype (in my case application/octet-stream is sufficient) when I call Share.share(...). This could be implemented as an optional object syntax in the files array of ShareOptions e.g.
Share.share({
...
files: [
{file: "file://location/", mimeType: "application/octet-stream"},
{file: "file://location/", mimeType: "application/octet-stream"},
]
}
Alternatives
- Allow the user to pass a custom MIME type map to the Share plugin prior to calling it.
- Incorporate a
defaultMimeTypeinShareOptionsthat is used wheneverandroid.webkit.MimeTypeMapis unable to determine the MIME type from the extension. - As a proof of concept I have manually changed the fallback MIME type in
SharePlugin.javain my build area to change it from*/*toapplication/octet-stream, though this is not a long-term solution. I.e. in the place where MIME types are inferred:
String type = getMimeType(file);
if (type == null || filesList.size() > 1) {
type = "application/octet-stream";
}
And this causes the share approach to work satisfactorily with WhatsApp.
- 主要言語
- Java
- スター
- 687
- フォーク
- 691
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ionic-team/capacitor-plugins のほかの issue
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ionic-team/capacitor-plugins#2616 ·
-
[@capacitor/app] iOS: 'Expression implicitly coerced from String? to Any' warning in getAppLanguageオープンtriage
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
ionic-team/capacitor-plugins#2604 ·
-
bug(network): Android networkStatusChange re-queries the active network inside callbacks and fires on every capability change対応中かも @kcjonson が 3 日前に担当しました。 オープンplatform: android
難易度 4/5 1〜2日 初心者へのやさしさ 25/100
ionic-team/capacitor-plugins#2621 ·
-
bug(network): iOS getStatus() returns the last reachability callback value instead of reading current flags対応中かも @kcjonson が 3 日前に担当しました。 オープンplatform: ios
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
ionic-team/capacitor-plugins#2620 ·
-
platform: android platform: ios
難易度 5/5 1週間以上 初心者へのやさしさ 24/100
ionic-team/capacitor-plugins#2619 ·
ionic-team/capacitor-plugins の issue をすべて見る
似ている issue
-
staticAssetsPath follows symlinks outside the directory on Windows対応中かも @ybelMekk が今日担当しました。 オープンbug security findings
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
navikt/mock-oauth2-server#1132 ·
メンテナーはふだん 1 日以内に返信
-
agent:working follow-up
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Sanne/incus-spawn#1683 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
checkstyle/checkstyle#22210 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
google/error-prone#6239 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Failing Test]: BigqueryClient.queryUnflattened fails BigQuery ITs on a transient 503対応中かも @mxtymoshyk が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信