Open aalsamoht opened 9 months ago
Hi
I have the same problem. It seems to work fine except the timeout error that is logged. Is there any update?
The last update I have is from OneSignal support on the 9th of February.
Hi there,
Just to update you on this, we have shared the feedback with our team and they have tested and determined the following :
Potential Android SDK Bug I do see this which indicates it should be marked as dismissed when the event handler calls e.preventDefault() , and not processed again on app open. We can look into this further for a future release.
Potential .NET SDK Enhancement Calling event.Notification.Display() with an extender should work, and they are right it does not exist in our SDK. However the PR I referenced earlier shows how we can update the SDK to enable that, but that is work we will need to do I'm not sure if the customer can create that binding on their own without forking our SDK
Any further updates will be shared on your Github issue as you have opted to reach out to the team directly.
Thank you
thank you for your feedback, so if I understand you still have the problem.
I had come up with a pull request on the previous version (for xamarin). at the time the team member who responded me sayed there was an interest but they had no time to do it themselves, eventually the PR never got merged and xamarin went out of support in the meantime. https://github.com/OneSignal/OneSignal-Xamarin-SDK/pull/381
I will try to look at this problem for this version and come up with a pull request. I have already a good hunch what might be happening . many APIs are not kept in the binding library for the notifications module because they reference type in the other (core) module.
We are experiencing this problem too.
It has nothing to do with the topic, but I can provide the namespace in android:value with ridiculous values like crc64c75c38fa2186e567. Do you know an easy way to do this?
What happened?
I’m trying to implement Android
INotificationServiceExtension
in a .NET MAUI application using OneSignalSDK.DotNet 5.0.2 I have followed the instructions from https://documentation.onesignal.com/docs/service-extensions#android-notification-service-extensionThe DotNet SDK does not wrap the Android code, so I must implement the interface from the Android binding project.
I have successfully received the event in both foreground and background and created my own push message using Notification.AdditionalData.
I call
e.PreventDefault()
to suppress the push message created by the OneSignalSDK, however after approximately 30 seconds the following log message is written and there is no "Confirmed" callback to OneSignal.However there is a greater problem with calling
e.PreventDefault()
, push notifications are sent multiple times toINotificationServiceExtension.OnNotificationReceived()
.onesignal_logcat_duplicate_notification.csv
MauiApp1.zip
Steps to reproduce?
What did you expect to happen?
Alternative one
e.PreventDefault()
Q1. How can I use
e.PreventDefault()
and set the event as successfully completed so that:INotificationServiceExtension.OnNotificationReceived()
is only called once for each push notification, avoidRestoring notifications
. (Critical)remoteNotificationReceived timed out
exception is not logged. (Optional)Q2. Are there any plans to implement
INotificationServiceExtension
in SDK so that I don’t need to use the Android.Binding project.Alternative two
notification.setExtender(...)
The OneSignal Android SDK has an interface
IMutableNotification
with asetExtender
method, https://documentation.onesignal.com/docs/service-extensions#step-1-create-a-class-for-the-service-extensionThere is no such method available in the OneSignalSDK.DotNet
IMutableNotification
interface, the interface is empty.Q3. How can i modify the notification before it is displayed by the OneSignalSDK.DotNet?
Relevant log output
No response
Code of Conduct