question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When app is killed i receive notification but without sound or vibrate

See original GitHub issue

Any ideas ?

FCM.presentLocalNotification({ title: notif.fcm.title, body: notif.fcm.body, icon: "ic_launcher", vibrate: 300, lights: true, show_in_foreground : true, sound: "default" });

everything work ok if app is not killed but when its killed i receive notification without sound. Does anybody have solution for that ?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
rubenfigcommented, Feb 7, 2018

What do you mean by data msg? I happen to have this issue too.

0reactions
barron9commented, Feb 7, 2018

you have to dispatch your message as data message, not notification.


      //from db
var to = result[0].firebaseid;
var notification = {
  'title':'CoffeeSnap',
  'body':'New Message from '+ result[0].name,
    'froms':res[0],
    'msg':res[2],
    'to':res[3],
    'fromname':result[0].name
  };

request.post(
    {
    url:'https://fcm.googleapis.com/fcm/send', 
        headers: 
     {
    'Authorization': 'key=' + key,
   'Content-Type': 'application/json'
     },
        
          json:{
    data: notification, // here must be " data: " not   " notification: "
    to: to
    }    },callback)


Read more comments on GitHub >

github_iconTop Results From Across the Web

when notification receive no vibrate and no sound in both ios ...
No matter the app state, (foreground, background, killed). I do receive the push notification but no sound or vibration.
Read more >
No notification sound and vibrate and lights when sending ...
I have an application with a notification working with vibrate. The only difference with your code is that I have the code like...
Read more >
FCM notification not received when app is terminated
I tried searching and doing what ppl have suggested but I just can't make the phone vibrate and it only makes a sound...
Read more >
User Notifications | Apple Developer Forums
Does anyone know how to send a notification from a watchOS app that notifiers the user by lightly tapping the user's wrist without...
Read more >
flutter_local_notifications | Flutter Package - Pub.dev
A cross platform plugin for displaying and scheduling local notifications for Flutter applications with the ability to customise for each platform.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found