firebase-admin-dotnet icon indicating copy to clipboard operation
firebase-admin-dotnet copied to clipboard

ClickAction is not working with Android

Open code4muktesh opened this issue 3 years ago • 4 comments

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.

code4muktesh avatar Jan 20 '22 16:01 code4muktesh

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Jan 20 '22 16:01 google-oss-bot

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.

lahirumaramba avatar Jan 20 '22 21:01 lahirumaramba

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

chong-shao avatar Jan 20 '22 21:01 chong-shao

@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);

code4muktesh avatar Jan 22 '22 05:01 code4muktesh