diff --git a/Examples/simple-fcm-client/app/App.js b/Examples/simple-fcm-client/app/App.js index a6d31707c422b53373f39bc9f38a09799d99206e..c1e375492a739f97e3fba683db4ad225ad87ccc4 100644 --- a/Examples/simple-fcm-client/app/App.js +++ b/Examples/simple-fcm-client/app/App.js @@ -66,17 +66,29 @@ class MainPage extends Component { showLocalNotification() { FCM.presentLocalNotification({ - vibrate: 500, - title: 'Hello', - body: 'Click me to detail page,', - big_text: 'Large Text Large Text Large Text Large Text Large Text Large Text Large Text Large Text Large Text Large Text Large Text Large Text Large Text Large Text ', - priority: "high", - sound: "bell.mp3", - large_icon: "https://image.freepik.com/free-icon/small-boy-cartoon_318-38077.jpg", - show_in_foreground: true, - group: 'test', - targetScreen: 'detail', - number: 10 + id: "UNIQ_ID_STRING", // (optional for instant notification) + title: "Test Notification with action", // as FCM payload + body: "Force touch to reply", // as FCM payload (required) + sound: "bell.mp3", // "default" or filename + priority: "high", // as FCM payload + click_action: "com.myapp.MyCategory", // as FCM payload - this is used as category identifier on iOS. + badge: 10, // as FCM payload IOS only, set 0 to clear badges + number: 10, // Android only + ticker: "My Notification Ticker", // Android only + auto_cancel: true, // Android only (default true) + large_icon: "https://image.freepik.com/free-icon/small-boy-cartoon_318-38077.jpg", // Android only + icon: "ic_launcher", // as FCM payload, you can relace this with custom icon you put in mipmap + big_text: "Show when notification is expanded", // Android only + sub_text: "This is a subText", // Android only + color: "red", // Android only + vibrate: 300, // Android only default: 300, no vibration if you pass 0 + wake_screen: true, // Android only, wake up screen when notification arrives + group: "group", // Android only + picture: "https://google.png", // Android only bigPicture style + ongoing: true, // Android only + my_custom_data:'my_custom_field_value', // extra data you want to throw + lights: true, // Android only, LED blinking (default false) + show_in_foreground: true // notification when app is in foreground (local & remote) }); }