shinyorg / shiny

.NET Framework for Backgrounding & Device Hardware Services (iOS, Android, & Catalyst)
https://shinylib.net
MIT License
1.43k stars 227 forks source link

[Bug]: Shiny not working with Azure Notification Hub and FCM V1 #1418

Closed South2AK closed 6 months ago

South2AK commented 6 months ago

Component/Nuget

GPS or Geofencing (Shiny.Locations)

What operating system(s) are effected?

Version(s) of Operation Systems

Android 14 API 34

Hosting Model

Steps To Reproduce

Set up Azure Notification Hub with FCM Setting up the project the same as in the documentation

Expected Behavior

Device should show a message which has been send via Azure Portal

Actual Behavior

Nothing happens when using FCM.

GCM works fine (will be wrk

Exception or Log output

Hi,

I´ve been trying to set up Azure Notification Hub with FCM V1.

I did add a Push Delegate and everything works fine for GCM, but when using FCM I get no response from the device (azure test shows no device received the message)

Is there anything to consider when using FCM instead of GCM?

Code Sample

No response

Code of Conduct

South2AK commented 6 months ago
builder.Services.AddPushAzureNotificationHubs<Helpers.Delegates.MNotificationDelegate>(
    "My UrL",
    "MyNotificationHub"
);
 public class MNotificationDelegate : IPushDelegate
 {
     public Task OnEntry(PushNotification notification)
     {
         return Task.CompletedTask;

     }

     public Task OnReceived(PushNotification notification)
     {

     Console.WriteLine(notification.data.ToString());
         return Task.CompletedTask;
     }

     public Task OnTokenRefreshed(string token)
     {
         return Task.CompletedTask;
     }
 }
aritchie commented 6 months ago

No reproducible sample

aritchie commented 6 months ago

This is the second time you haven't produced a reproducible sample. Please respect my time and this repo or you'll be removed from it. Please note that this is also not meant as a support forum. You can see the integration with azure is light, so server details are something you should follow OUTSIDE of this repo