Commit 709b60df authored by Simon Lemieux's avatar Simon Lemieux Committed by Libin Lu

Add basic LED blinking support for local notifications on Android (#138)

parent c3b2c718
......@@ -264,6 +264,7 @@ class App extends Component {
tag: 'some_tag', // Android only
group: "group", // Android only
my_custom_data:'my_custom_field_value', // extra data you want to throw
lights: true, // Android only, LED blinking (default false)
});
FCM.scheduleLocalNotification({
......
......@@ -150,6 +150,11 @@ public class FIRLocalMessagingHelper {
}
}
//lights
if (bundle.getBoolean("lights")) {
notification.setDefaults(NotificationCompat.DEFAULT_LIGHTS);
}
if(mIsForeground){
Log.d(TAG, "App is in foreground, broadcast intent instead");
Intent i = new Intent("com.evollu.react.fcm.ReceiveLocalNotification");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment