Notification receipt delivery for Android and iOS (#2755)

* Notification receipt delivery for Android and iOS

* Update Fastlane with iOS notification service extension

* User JSONObject to build response
This commit is contained in:
Elias Nahum
2019-05-15 12:45:26 -04:00
committed by GitHub
parent b746a170a7
commit 5bf96272ae
9 changed files with 435 additions and 22 deletions

View File

@@ -94,7 +94,13 @@ public class CustomPushNotification extends PushNotification {
Bundle data = mNotificationProps.asBundle();
final String channelId = data.getString("channel_id");
final String type = data.getString("type");
final String ackId = data.getString("ack_id");
int notificationId = MESSAGE_NOTIFICATION_ID;
if (ackId != null) {
notificationReceiptDelivery(ackId, type);
}
if (channelId != null) {
notificationId = channelId.hashCode();
Object objCount = channelIdToNotificationCount.get(channelId);
@@ -379,4 +385,8 @@ public class CustomPushNotification extends PushNotification {
String sender = String.format("%s: ", getSenderName(senderName, channelName, message));
return message.replaceFirst(sender, "");
}
private void notificationReceiptDelivery(String ackId, String type) {
ReceiptDelivery.send(context, ackId, type);
}
}