andrei-m-code / net-core-push-notifications

Lightweight .NET Core Push Notifications for Android, iOS and Web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Return response and add knowledge about returned exceptions

kostebudinoski opened this issue · comments

Would it be possible to extend your fcm/apn senders logic with knowledge about provider responses as PushSharp library does?

GCM example reference:
https://github.com/Redth/PushSharp/blob/master/PushSharp.Google/GcmServiceConnection.cs

Thanks for your efforts!

First of all I'm not using GCM, instead it is FCM from Google. I think we can add some details about the response if data is available. Need to look into it. But keep in mind, current implementation of the library only sends notification to 1 sender at a time, it means, you have access to number of failed/succeeded calls and what not. Let me know what data you're interested in and I'll look into adding it to the result (return value of a SendAsync method).

Sure, I know you are using FCM, it's anyway the recommended one.
Setting GcmUrl propery, in the GcmConfiguration class, to fcm one, resolves the "issue" PushSharp has:

Reference:
https://github.com/Redth/PushSharp/blob/master/PushSharp.Google/GcmConfiguration.cs

I hope FCM returns more or less same success/error responses, since we are using FCM endpoint with PushSharp atm.

We are sending notifications to 1 sender also. Sending message to multiple registration would be also great to have (in future)!

I guess this class can help you with the responses I am interested in:
https://github.com/Redth/PushSharp/blob/master/PushSharp.Google/GcmMessageResult.cs

However, we should check official FCM/APN documentaiton regarding it.

I am thinking of switching to your library, but I am blocked untill we have more knowledge into it.

@kostebudinoski ok, thanks! I'll look into it, but it won't be today. You're welcome to open a PR just saying ;)

any update on this @andrei-m-code? Thanks!

@kostebudinoski thank you for your request. I have released v2.0.3 with Fcm response. Please try and let me know if it works for you.