2017-10-25 6 views
0

zo0r/react-native-push-notificationとRN 0.43を使用しています。リアクションネイティブ - デバイスがロックされているときにプッシュ通知を受け取りません

デバイスがロックされていない限り、すべて正常に動作しています。私は何度も前後に試してみましたが、うまくいきましたが、の部分がに変更されたため、デバイスがロックされている間は通知が届きません。

これは私の設定です:サーバーからの通知を送信する場合

PushNotification.configure({ 
    onRegister: function(token) { 
     UserStore.storeDeviceToken(token) 
    }, 

    onNotification: function(notification) { 
     if (notification) { 
      PushHandler.notificationReceived(notification) 
     } 
    }, 

    permissions: { 
     alert: true, 
     badge: true, 
     sound: true 
    }, 

    popInitialNotification: true, 
    userInteraction: true, 
    requestPermissions: true 
}) 

答えて

1

あなたはmotificationペイロードに

{ 
"content_available": true, 
"priority":"high", 
"show_in_foreground": true 
...other_data 
} 
をmecessary値で、次のキーを提供する必要があります
関連する問題