Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. this.backgroundMode.enable();
  2.  
  3. bringToForeground() {
  4. this.sleep(5000).then(() => {
  5. this.backgroundMode.moveToForeground();
  6. this.localNotifications.schedule({
  7. id: 2,
  8. text: '2 -> Single ILocalNotification',
  9. sound: 'file://sound.mp3',
  10. data: { secret: "" }
  11. });
  12.  
  13. })
  14.  
  15. }
  16.  
  17.  
  18. sleep(time) {
  19. return new Promise((resolve) => setTimeout(resolve, time));
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement