[messaging-core] Problems with requesting permissions on Android 33
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- android, firebase, typescript
- Lĩnh vực
- mobile
Hướng nghiên cứu
Bắt đầu với packages/firebase-messaging-core/index.android.ts tại các dòng 314-319 và lần theo luồng requestPermission của Android 33 bằng cách sử dụng lời gọi mẫu trong issue. So sánh hành vi khi bị từ chối với phần triển khai iOS được người báo cáo mô tả. Được xem là hoàn tất khi đã hiểu hành vi trên trình giả lập hoặc thiết bị và kết quả quyền bị từ chối nhất quán với kỳ vọng đa nền tảng đã nêu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 62
- Fork
- 53
- Merge trung bình
- 8 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 2
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NativeScript/firebase
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
NativeScript/firebase#292 ·
-
Can't install package Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
NativeScript/firebase#289 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
NativeScript/firebase#288 · 4 reaction ·
-
bug ios
NativeScript/firebase#287 · 1 người được giao ·
-
Uh-Oh Shazam Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
NativeScript/firebase#286 ·
Tất cả issue của NativeScript/firebase
Issue tương tự
-
[Bug]: Discord Activity titles with emoji are rejected as over 80 characters when they are not Đang mởclawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
supermomonga/zcode-acp#24 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
growthbook/growthbook#7100 ·
-
triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100