2017-03-08 5 views
1

私は常に2番目のオブジェクトの通知を受け取ります。最初のオブジェクトの通知は受信されません。私はLocal Notificationsプラグインを使用しています:https://ionicframework.com/docs/v2/native/local-notifications/ from ionic native。 助けがあれば助かります。複数の遅延ローカル通知をイオンでスケジュールする2

LocalNotifications.schedule([{ 
    id: 1, 
    text: 'Multi ILocalNotification 1', 
    at: new Date("2017-03-08T10:35:00") 

}, { 
    id: 2, 
    title: 'Local ILocalNotification Example', 
    text: 'Multi ILocalNotification 2',  
    at: new Date("2017-03-08T10:40:00") 
}]); 
+0

新しい日付の作品( "2017-03-08T10:35:00")GMT + 0545(ネパール標準時)水2017年3月8日に午後4時20分00秒を与えます。だから私は正しい時間を得ていない。私は「T」を取り除いて正常に動作しています。 –

答えて

0

こんにちはYou'rラッキー 私はただ1つだけのローカル通知を持っていますが、電話がロックされ、画面が黒くなっているとき、それは仕事をdoesntのイオン2を使用しています。

それが唯一の電話が起きているとき

let now = new Date(); 
    let time1=new Date(); 

    time1.setMinutes(now.getMinutes()+1) 
     this.timer=time1; 
this.localNotifications.schedule([{ 
      id:1, 
      title: "test", 
      text: "tester ?", 
      at: time1, 
      sound: "file://assets/sound/speed_camera.mp3", 

     }] 
+1

ようこそ。質の高い回答を提供するためには、この[how-to-answer](http://stackoverflow.com/help/how-to-answer)をお読みください。 – thewaywewere

関連する問題