firebase / firebase-admin-dotnet

Firebase Admin .NET SDK
https://firebase.google.com/docs/admin/setup
Apache License 2.0
357 stars 129 forks source link

ClickAction is not working with Android #313

Open code4muktesh opened 2 years ago

code4muktesh commented 2 years ago

If trying to send push notification using this sdk then notification is being received on device but clicking on notification is not working. But, If directly sending the request to old APIs(https://fcm.googleapis.com/fcm/send) using postman then it is working as expected.

google-oss-bot commented 2 years ago

I found a few problems with this issue:

lahirumaramba commented 2 years ago

Hi @code4muktesh could you provide us with a minimal repro on this? It is difficult to investigate without seeing how you used the API. Thank you.

chong-shao commented 2 years ago

Hello, @code4muktesh feel free to assign the issue back to me after the sample code to reproduce this issue is posted.

code4muktesh commented 2 years ago

@chong-shao
sample code :

var message = new MulticastMessage()
{
    Tokens = registrationTokens,

    Data = new Dictionary<string, string>()
    {
        { "title", "title test" },
        { "body", "Desc1" },

    },
    Android = new AndroidConfig()
    {
        Notification = new AndroidNotification()
        {
            Title = "title test",
            Body = "Desc",
            ImageUrl = "http://xxxxxxx",
            ChannelId = "Default",
            ClickAction = "com.test.app",
        },
        Priority = Priority.High
    }
};
var response = await FirebaseMessaging.DefaultInstance.SendMulticastAsync(message).ConfigureAwait(true);