Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save leifwells/d80f25e1fba0506467f2864dfaf362bc to your computer and use it in GitHub Desktop.
Save leifwells/d80f25e1fba0506467f2864dfaf362bc to your computer and use it in GitHub Desktop.
LocalNotifications.schedule( {
id: 1, // Number, used as unique identifier
title: 'Sample Local Notification', // String, 1st row of notification
text: 'This is a sample local notification.', // String,
// 2nd row of the notification
/* WARNING: USING THE DEFAULT SOUND
'res://platform_default'
DOES NOT PLAY SOUND IN THE EMULATOR */
sound: 'file://audio/notification.wav', // Uri, path to sound file
/* TIME SET TO TEN SECONDS
FROM THE TIME OF THE TAP */
at: new Date(new Date().getTime() + 10000) // Date or Number, time notification should trigger
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment