-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/push notification model (#239)
* feature: add notification request when start the app Asked permission to receive notification on the device when start the app. * feature: add notification token on Profile Added token notification on the Firestore db on the first connection after requesting notification permission. * feature: cloud function to fetch tokens Created a cloud function to fetch notification tokens to send a notification. * fix: permission notification on debug mode Added a boolean to don't ask notification permission on each tests, but only if the app is not on debug mode. * fix: deleted "2" error in index.ts Deleted compilation error in index.ts * feature: add cloud function for push notif Added a cloud function for push notification * feature: add cloud function for push notif Added a cloud function for push notification * fix: modify fetch notification firestore Modified the function sendNotification. * fix: resolve console errors with MulticastMessage Modified the function sendNotification changing with a multicast * fix: fix the multicast message and use new FCM API * feature: added push notification with item notification Added a push notification when you add a friend, add someone to a travel or change the role of a participant. * test: adapte tests to push notification * test(notification): add unit tests for sendNotificationToUser method * test(notification): fix test to verify addNotification is called at least once * chore: disable clear text traffic for security * chore: avoid code duplication Deleted duplicated code with refactored function * doc: add credits to modified files Added LLM credits for code genereted by llm * chore: delete duplicated description Deleted credits llm on old files --------- Co-authored-by: Sylvain Nérisson <sylvain.nerisson@epfl.ch> Co-authored-by: RemIsMyWaifuu <160653991+RemIsMyWaifuu@users.noreply.github.com>
- Loading branch information
1 parent
d8627ec
commit 70f9906
Showing
19 changed files
with
383 additions
and
17 deletions.
There are no files selected for viewing
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
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
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
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
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
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
17 changes: 17 additions & 0 deletions
17
...c/main/java/com/github/se/travelpouch/model/notifications/push/PushNotificationService.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.github.se.travelpouch.model.notifications.push | ||
|
||
import com.google.firebase.messaging.FirebaseMessagingService | ||
import com.google.firebase.messaging.RemoteMessage | ||
|
||
class PushNotificationService : FirebaseMessagingService() { | ||
|
||
@Override | ||
override fun onNewToken(token: String) { | ||
super.onNewToken(token) | ||
} | ||
|
||
@Override | ||
override fun onMessageReceived(remoteMessage: RemoteMessage) { | ||
super.onMessageReceived(remoteMessage) | ||
} | ||
} |
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
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
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
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
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
Oops, something went wrong.