[messaging-core] Problems with requesting permissions on Android 33
還沒有人認領這個 Issue。
評估
- 難度
- 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
- 平均合併
- 7 分鐘
- 30 天內合併 PR
- 1
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 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 個 reaction ·
-
[messaging-core][ios] getCurrentToken stalls可能重新可做 @triniwiz 於 189 天前認領,目前沒有進行中的 PR。 未關閉bug ios
NativeScript/firebase#287 · 已指派 1 人 ·
-
Uh-Oh Shazam未關閉
難度 4/5 3-5 天 新手友好度 20/100
NativeScript/firebase#286 ·
查看 NativeScript/firebase 的全部 Issue
相似的 Issue
-
dx hacktoberfest help wanted
難度 2/5 1-3 小時 新手友好度 85/100
維護者通常 1 天內回覆
-
documentation
難度 1/5 1 小時以內 新手友好度 88/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
cloudflare/agents#2498 ·
維護者通常 1 天內回覆
-
Missing repro Platform: Android
難度 2/5 1-3 小時 新手友好度 78/100
software-mansion/react-native-reanimated#10816 · 2 則留言 ·
維護者通常 1 天內回覆
-
e2e-failure ready-to-code
難度 2/5 1-3 小時 新手友好度 76/100
redhat-developer/rhdh-plugin-export-overlays#4129 ·
維護者通常 1 天內回覆