[PR #2056] [MERGED] [SG-472] Add configuration for new notification type #9469

Closed
opened 2026-04-11 02:21:40 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2056
Author: @andrebispo5
Created: 8/31/2022
Status: ✅ Merged
Merged: 9/2/2022
Merged by: @andrebispo5

Base: feature/feature-passwordless-login ← Head: feature/passwordless-notifications-config


📝 Commits (6)

  • 1ccccfc [SG-472] Added methods to present local notification to the user. Configured new notification type for passwordless logins
  • 8efc8e2 Merge branch 'feature/feature-passwordless-login' into feature/passwordless-notifications-config
  • 156e899 [SG-472] Updated code to new api service changes.
  • 50e6e7f [SG-472] ran dotnet format
  • 8b800db [SG-472] PR Fixes.
  • c1627e6 [SG-472] PR Fixes

📊 Changes

19 files changed (+241 additions, -42 deletions)

View changed files

📝 src/Android/MainActivity.cs (+21 -1)
📝 src/Android/Push/FirebaseMessagingService.cs (+24 -15)
📝 src/Android/Services/AndroidPushNotificationService.cs (+33 -0)
📝 src/App/Abstractions/IPushNotificationService.cs (+4 -1)
📝 src/App/App.xaml.cs (+32 -4)
📝 src/App/Pages/Accounts/LoginPasswordlessPage.xaml (+2 -8)
📝 src/App/Pages/Accounts/LoginPasswordlessViewModel.cs (+5 -2)
📝 src/App/Resources/AppResources.Designer.cs (+12 -0)
📝 src/App/Resources/AppResources.resx (+6 -0)
📝 src/App/Services/NoopPushNotificationService.cs (+6 -1)
📝 src/App/Services/PushNotificationListenerService.cs (+26 -0)
📝 src/Core/Abstractions/IStateService.cs (+3 -0)
📝 src/Core/Constants.cs (+3 -0)
📝 src/Core/Models/Response/NotificationResponse.cs (+6 -0)
📝 src/Core/Models/Response/PasswordlessLoginResponse.cs (+1 -7)
📝 src/Core/Services/StateService.cs (+17 -0)
📝 src/iOS/AppDelegate.cs (+1 -1)
📝 src/iOS/Services/iOSPushNotificationHandler.cs (+0 -1)
📝 src/iOS/Services/iOSPushNotificationService.cs (+39 -1)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Configure the mobile app to be able to receive and process a new notification type associated with passwordless login.
Added configuration to be able to show local notifications to the user and dismiss them.

Code changes

  • src/App/App.xaml.cs:
    Added subscription in the broadcast service for unlock and passwordlessLoginRequest. Every time the user unlocks its vault, if there is any pending request, then the app should show the accept/decline modal. If the user in within the app and a new passwordless login notification arrives, it will broadcast a passwordlessLoginRequest message, showing the the accept/decline modal.
  • src/Android/Services/IPushNotificationService.cs:
    SendLocalNotification DismissLocalNotification added methods to the interface and following platform implementation. These methods are used to manage device notifications.

Screenshots

image

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/2056 **Author:** [@andrebispo5](https://github.com/andrebispo5) **Created:** 8/31/2022 **Status:** ✅ Merged **Merged:** 9/2/2022 **Merged by:** [@andrebispo5](https://github.com/andrebispo5) **Base:** `feature/feature-passwordless-login` ← **Head:** `feature/passwordless-notifications-config` --- ### 📝 Commits (6) - [`1ccccfc`](https://github.com/bitwarden/android/commit/1ccccfcdc977d638da097ebb16a743d016833539) [SG-472] Added methods to present local notification to the user. Configured new notification type for passwordless logins - [`8efc8e2`](https://github.com/bitwarden/android/commit/8efc8e21df2071e0564a21e5f5dbbddae414770e) Merge branch 'feature/feature-passwordless-login' into feature/passwordless-notifications-config - [`156e899`](https://github.com/bitwarden/android/commit/156e899cbac290e72053913ea3019e80ac39ee5f) [SG-472] Updated code to new api service changes. - [`50e6e7f`](https://github.com/bitwarden/android/commit/50e6e7f635e3d0088344efec738fa5e114a7b2df) [SG-472] ran dotnet format - [`8b800db`](https://github.com/bitwarden/android/commit/8b800db93bc8e75721bb50d8f47724537d8127a9) [SG-472] PR Fixes. - [`c1627e6`](https://github.com/bitwarden/android/commit/c1627e60af00a9d734ee22a93fe3a0ecc5aa8432) [SG-472] PR Fixes ### 📊 Changes **19 files changed** (+241 additions, -42 deletions) <details> <summary>View changed files</summary> 📝 `src/Android/MainActivity.cs` (+21 -1) 📝 `src/Android/Push/FirebaseMessagingService.cs` (+24 -15) 📝 `src/Android/Services/AndroidPushNotificationService.cs` (+33 -0) 📝 `src/App/Abstractions/IPushNotificationService.cs` (+4 -1) 📝 `src/App/App.xaml.cs` (+32 -4) 📝 `src/App/Pages/Accounts/LoginPasswordlessPage.xaml` (+2 -8) 📝 `src/App/Pages/Accounts/LoginPasswordlessViewModel.cs` (+5 -2) 📝 `src/App/Resources/AppResources.Designer.cs` (+12 -0) 📝 `src/App/Resources/AppResources.resx` (+6 -0) 📝 `src/App/Services/NoopPushNotificationService.cs` (+6 -1) 📝 `src/App/Services/PushNotificationListenerService.cs` (+26 -0) 📝 `src/Core/Abstractions/IStateService.cs` (+3 -0) 📝 `src/Core/Constants.cs` (+3 -0) 📝 `src/Core/Models/Response/NotificationResponse.cs` (+6 -0) 📝 `src/Core/Models/Response/PasswordlessLoginResponse.cs` (+1 -7) 📝 `src/Core/Services/StateService.cs` (+17 -0) 📝 `src/iOS/AppDelegate.cs` (+1 -1) 📝 `src/iOS/Services/iOSPushNotificationHandler.cs` (+0 -1) 📝 `src/iOS/Services/iOSPushNotificationService.cs` (+39 -1) </details> ### 📄 Description ## Type of change - [ ] Bug fix - [X] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Configure the mobile app to be able to receive and process a new notification type associated with passwordless login. Added configuration to be able to show local notifications to the user and dismiss them. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **src/App/App.xaml.cs:** Added subscription in the broadcast service for `unlock` and `passwordlessLoginRequest`. Every time the user unlocks its vault, if there is any pending request, then the app should show the accept/decline modal. If the user in within the app and a new passwordless login notification arrives, it will broadcast a `passwordlessLoginRequest` message, showing the the accept/decline modal. * **src/Android/Services/IPushNotificationService.cs:** `SendLocalNotification` `DismissLocalNotification` added methods to the interface and following platform implementation. These methods are used to manage device notifications. ## Screenshots <img width="375" alt="image" src="https://user-images.githubusercontent.com/4648522/187905384-3576bc6b-dda7-4eb2-afa6-489edb07fd39.png"> ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-11 02:21:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#9469