Created
December 27, 2020 17:17
-
-
Save ShanikaNishadhi/fbffae04e28cec6e15e6587366517686 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PushNotification from 'react-native-push-notification' | |
const showNotifications = (title, message) => { | |
PushNotification.localNotification({ | |
title: title, | |
message: message, | |
}); | |
}; | |
const handleScheduleNotifications = (title, message) => { | |
PushNotification.localNotification({ | |
title: title, | |
message: message, | |
date: new Date(Date.now() + 5 * 1000), | |
}); | |
}; | |
const handleCancel = () => { | |
PushNotification.cancelAllLocalNotifications(); | |
} | |
export { showNotifications, handleScheduleNotifications , handleCancel }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment