[messaging-core] Problems with requesting permissions on Android 33
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- android, firebase, typescript
- 領域
- mobile
調査の方向性
packages/firebase-messaging-core/index.android.ts の314-319行目から始め、Issueのサンプル呼び出しを使って Android 33 の requestPermission パスを追跡してください。拒否時の動作を、報告者が説明している iOS 実装と比較してください。エミュレーターまたはデバイスでの動作を理解し、拒否された権限の結果が示されたクロスプラットフォームの期待と一致すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I'm trying to migrate from the old firebase plugin to this one, and I'm getting some strange problem testing on a simulator with API 33. As soon as I call the request permissions, I do not get any prompts and I get a rejection. Here is a sample code:
export async function onTap() {
try {
const result = await MessagingCore.getInstance().requestPermission();
console.log("RES", result);
}
catch (e) {
console.error("ERROR", e);
}
}
From what I see it is because of this:
https://github.com/NativeScript/firebase/blob/889726640381cb4a0cdbe855f658ff3245a0eb3d/packages/firebase-messaging-core/index.android.ts#L314-L319
Does requesting permissions for notifications work only on physical devices?
Also why does this code reject while the iOS code resolves even if permission is denied but with the correct status code? Shouldn't this be changed to resolve(AuthorizationStatus.DENIED) for better cross platform interoperability? Right now I have to surround the request call with an empty try/catch to simulate similar behavior as on iOS.
- 主要言語
- TypeScript
- スター
- 62
- フォーク
- 53
- 平均マージ
- 8日 4時間
- マージ済み PR(30日)
- 2
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NativeScript/firebase のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
NativeScript/firebase#292 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
NativeScript/firebase#289 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
NativeScript/firebase#288 · リアクション 4 件 ·
-
bug ios
NativeScript/firebase#287 · 担当者 1 名 ·
-
Uh-Oh Shazam オープン
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
NativeScript/firebase#286 ·
NativeScript/firebase の issue をすべて見る
似ている issue
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
supermomonga/zcode-acp#24 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
growthbook/growthbook#7100 ·
-
triage
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100