Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[messaging-core] Problems with requesting permissions on Android 33

オープン
#168 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NativeScript/firebase のほかの issue

NativeScript/firebase の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。