From 04e36afdd2b7d988e45e8105bf7f30c623a6056d Mon Sep 17 00:00:00 2001 From: Libin Lu Date: Tue, 6 Mar 2018 16:14:02 -0500 Subject: [PATCH] update example --- Examples/simple-fcm-client/app/App.js | 34 ++++++++++++++++++--------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/Examples/simple-fcm-client/app/App.js b/Examples/simple-fcm-client/app/App.js index a6d3170..c1e3754 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) }); } -- 2.26.2