OneSignal / OneSignal-Xamarin-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Xamarin app with OneSignal. https://onesignal.com
Other
104 stars 50 forks source link

Confirmed deliveries #237

Closed eiriklie closed 3 years ago

eiriklie commented 3 years ago

Description:

Should the "Confirmed delivery" feature work with SDK version 3.10.5? According to the documentation, it should work on SDK > 3.7 when you have a paid account. Does it need any extra setup to work properly? I can confirm that i receive the push on my testphones, but "Confirmed" count always shows 0.

Environment

SDK version 3.10.5 added via nuget to to Forms, iOS and Android projects. Also the iOS have an iOS Notification Service Extension .

Steps to Reproduce Issue:

Anything else:

(crash stacktraces, as well as any other information here)

jkasten2 commented 3 years ago

@eiriklie The OneSignal-Xamarin-SDK 3.10.5 does have confirmed deliveries feature. For iOS as long as you have correctly setup the Notification Service Extension and App Groups this should be working. For Android, no extra steps are needed.

As long as the notification is displayed (silent notifications don't support Confirmed Deliveries) in the notification shade / center it will be counted as confirmed.

Debugging

It is easier to debug Confirmed Deliveries on Android than iOS if you are seeing an issue with both.

  1. Enable OneSignal debug or verbose logging.
  2. Background the app
  3. Send a push notification from OneSignal
  4. Check the Android Logcat for "sendReceiveReceipt"

On step for you should see either "sendReceiveReceipt disable" or ""sendReceiveReceipt appId:" https://github.com/OneSignal/OneSignal-Android-SDK/blob/e0ea2f09f2290824a68a1aabb68843d453629e75/OneSignalSDK/onesignal/src/main/java/com/onesignal/OSReceiveReceiptController.java#L53

eiriklie commented 3 years ago

Thank you for the reply. I'll investigate my code closer.