NativeScript / NativeScript/firebase
[messaging-core] Problems with requesting permissions on Android 33
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 62
- フォーク
- 53
- 平均マージ
- 8日 4時間
- マージ済み PR(30日)
- 2
説明
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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
packages/firebase-messaging-core/index.android.ts の314-319行目から始め、Issueのサンプル呼び出しを使って Android 33 の requestPermission パスを追跡してください。拒否時の動作を、報告者が説明している iOS 実装と比較してください。エミュレーターまたはデバイスでの動作を理解し、拒否された権限の結果が示されたクロスプラットフォームの期待と一致すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- android, firebase, typescript
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100