firebase / firebase-admin-dotnet

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

image does not show in the notification in Firefox Developer #308

Closed msngithub closed 2 years ago

msngithub commented 3 years ago

i use following code to send notification , but image does not show in firefox developer , The image is displayed well in Chrome what should i do ?

        var path = _env.ContentRootPath + "/private_key_firebase.json";
        FirebaseApp app = null;
        try
        {
            app = FirebaseApp.GetInstance("webbitTask");
            if (app == null)
            {
                app = FirebaseApp.Create(new AppOptions()
                {
                    Credential = GoogleCredential.FromFile(path)
                }, "webbitTask");
            }
        }
        catch (Exception ex)
        {
           return;
        }
        var fcm = FirebaseAdmin.Messaging.FirebaseMessaging.GetMessaging(app);
        Message message = new Message()
        {
            Notification = new Notification
            {
                Title = "Title of my notification",
                Body = "Content of my notification",
                ImageUrl = "https://my.webbit.ir/Admin/Templates/Default/images/backgrounds/logo144.png"
            },
            Webpush = new WebpushConfig()
            {
                FcmOptions = new WebpushFcmOptions()
                {
                    Link = "https://www.webbit.ir",
                }
            },
            Token = "myToken"

        };

        await fcm.SendAsync(message);
google-oss-bot commented 3 years ago

I found a few problems with this issue:

hiranya911 commented 2 years ago

@msngithub we cannot really address this issue in this repo, which acts as the notification sender. This should probably be reported at https://github.com/firebase/firebase-js-sdk, which I believe is the notification receiver. Or file a support issue at https://firebase.google.com/support/troubleshooter/report