oney / react-native-gcm-android

GCM for React Native Android
MIT License
172 stars 76 forks source link

smallIcon support #31

Open cpsiaki opened 8 years ago

cpsiaki commented 8 years ago

I'm reading documentation for system-notification and they seem to have features for lights (led indicator) and smallIcon. Do you have these features passing through to system-notificication in launchNotification?

oney commented 8 years ago

We create notification by using react-native-system-notification module. You can do it like below

if (GcmAndroid.launchNotification) {
  var notification = GcmAndroid.launchNotification;
  var info = JSON.parse(notification.info);
  Notification.create({
    subject: info.subject,
    message: info.message,
    smallIcon: 'ic_alert',
  });
  GcmAndroid.stopService();
} else {
  ...