react-native-fcm icon indicating copy to clipboard operation
react-native-fcm copied to clipboard

Can I schedule local notification and receive it when app is closed?

Open chertpong opened this issue 9 years ago • 4 comments

I've already try to schedule a notification when app is in foreground and background, it works fine. but when I close the app, it doesn't wake my app and show notification. have I done anything wrong?

FCM.scheduleLocalNotification({
      fire_date: moment().add(30,'seconds').toDate().getTime(),
      id: '1111',
      body: 'hello',
      repeat_interval: 'minute',
      count: 3,
      show_in_foreground: true
    });

react-native version: 0.33 react-native-fcm: 2.5.0 android: 5.11

chertpong avatar Dec 11 '16 08:12 chertpong

it was my fault. I'm using Xiaomi and it has some security function that preventing my app from autostarting itself.

chertpong avatar Dec 11 '16 10:12 chertpong

I am experiencing same issue on Xiaomi when app is in background. Did you solve the issue and how?

zvoncha avatar Feb 08 '17 09:02 zvoncha

@zvoncha Oh, it was 2 months ago, if my memory is good enough. Then, this will be correct solution. Open Security > Autostart, then select your app and switch on. please let me know if it can help you

chertpong avatar Feb 08 '17 13:02 chertpong

Thanks @chertpong .

This solved issue.

zvoncha avatar Feb 10 '17 08:02 zvoncha