Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70440

Push FCM not show image

$
0
0

@easychurch wrote:

My code:

    const payload: admin.messaging.Message = {
      notification,
      android: {
        ttl: 3600 * 1000,
        notification: {
          icon: 'https://firebasestorage.googleapis.com/v0/b/easychurchmobile.appspot.com/o/easychurch%2Flogo_plena.png?alt=media&token=aa67fd68-1325-4b8d-b692-085a211b397d',
          color: '#f45342',
          sound: 'default',
          clickAction: nota.href
        },
      },
      apns: {
        payload: {
          aps: {
            mutableContent: true,
            alert: {
              title: '$GOOG up 1.43% on the day',
              body: '$GOOG gained 11.80 points to close at 835.67, up 1.43% on the day.',
              launchImage: 'https://firebasestorage.googleapis.com/v0/b/easychurchmobile.appspot.com/o/easychurch%2Flogo_plena.png?alt=media&token=aa67fd68-1325-4b8d-b692-085a211b397d',
              actionLocKey: nota.href
            },
            contentAvailable: true,
            sound: 'default',
            badge: 0,
          },
        },
      },
      webpush: {
        notification: {
          title: '$GOOG up 1.43% on the day',
          body: '$GOOG gained 11.80 points to close at 835.67, up 1.43% on the day.',
          icon: 'https://firebasestorage.googleapis.com/v0/b/easychurchmobile.appspot.com/o/easychurch%2Flogo_plena.png?alt=media&token=aa67fd68-1325-4b8d-b692-085a211b397d'
        }
      },
      topic: nota.params.topico
    };

    console.log('Nota', nota);
    console.log('Payload', payload);
    return admin.messaging().send(payload);

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70440

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>