FCM - Notification Image not displaying
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
- 48/100
Hướng nghiên cứu
Bắt đầu với src/main/java/com/google/firebase/messaging/Notification.java được tham chiếu và so sánh trường image của nó với tham chiếu imageUrl của Node.js được liên kết. Theo dõi cách Notification được biểu diễn trong yêu cầu FCM, sau đó xác thực ví dụ multicast được cung cấp trên iOS và Android; hoàn tất khi hình ảnh thông báo được hiển thị.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe your environment
- Operating System version: macOS 13.0 (22A380)
- Firebase SDK version: 9.1.1
- Library version: 9.1.1
- Firebase Product: Cloud Messaging (auth, database, storage, etc)
Steps to reproduce:
Images are not displayed on devices (both iOS and Android) when sending notifications with FCM.
I set the image URL using the Notification Builder.
List<String> fcmTokens = List.of(...);
Notification notification = Notification.builder().setTitle("Hello").setBody("world").setImage("https://e-cdns-images.dzcdn.net/images/cover/f2d3db07f3f045a048cdacf53b5cf9dd/250x250-000000-80-0-0.jpg").build();
MulticastMessage message = MulticastMessage.builder()
.setNotification(notification)
.addAllTokens(fcmTokens).build();
BatchResponse response = FirebaseMessaging.getInstance().sendMulticast(message);
Note that I receive the notification on the devices, only the image is not displayed. I am able to see the image in the notification when sending it using the Firebase Console.
When investigating the issue, I discovered that other SDKs use imageUrl instead of image attribute.
For example, for NodeJS: https://firebase.google.com/docs/reference/admin/node/firebase-admin.messaging.notification.md#notificationimageurl
The Java SDK still uses the image key instead of imageUrl: https://github.com/firebase/firebase-admin-java/blob/master/src/main/java/com/google/firebase/messaging/Notification.java#L33
- Ngôn ngữ chính
- Java
- Star
- 620
- Fork
- 305
- Merge trung bình
- 3 giờ 23 phút
- Pull request đã merge (30 ngày)
- 1
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 firebase/firebase-admin-java
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
firebase/firebase-admin-java#1231 ·
-
api: core
firebase/firebase-admin-java#1198 · 3 bình luận · 1 người được giao ·
-
[BUG] RemoteConfig unit tests fail in non-English (e.g., Korean) Locales due to Date Parsing Đang mởapi: remoteconfig
firebase/firebase-admin-java#1196 · 1 bình luận · 2 người được giao ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
firebase/firebase-admin-java#1192 · 3 bình luận ·
-
needs-triage type: feature request
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
firebase/firebase-admin-java#1149 · 1 bình luận ·
Tất cả issue của firebase/firebase-admin-java
Issue tương tự
-
bug untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
opensearch-project/ml-commons#5094 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
emitter:client:csharp feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
affects/8.10 affects/8.9 component/clients kind/bug likelihood/mid severity/mid
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Đang mởbug frontend maui-pilot
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100