Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5178 +/- ##
==========================================
+ Coverage 68.80% 69.29% +0.49%
==========================================
Files 392 463 +71
Lines 16373 17803 +1430
Branches 1846 2071 +225
==========================================
+ Hits 11265 12337 +1072
- Misses 4527 4820 +293
- Partials 581 646 +65
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| :param device_token: The record to be saved. | ||
| :type device_token: DeviceToken | ||
| """ | ||
| session.add(device_token) |
There was a problem hiding this comment.
When I test this in ASA Go on my iphone, I noticed that if I close the app then open it again, I get a new record stored with a different token each time. Maybe there's something I don't understand about these tokens.....is that expected?
There was a problem hiding this comment.
I wonder if we should be using this with a device_id column as well, for upserting tokens: https://capacitorjs.com/docs/apis/device#getid
There was a problem hiding this comment.
Strange, I definitely don't see that on Android! The fcm token for my phone survives app re-starts, phone re-starts and app re-installs. I'll explore upserting as you suggested.
|



@capacitor-firebase/messaginginstead of@capacitor/push-notificationsas it simplifies token handling (ie. no need to handle FCM and APNs tokens separately)@capacitor/deviceto get unique device id for storage of fcm tokensWill require local copies of
mobile/asa-go/ios/App/App/GoogleService-Info.plistandmobile/asa-go/android/app/google-services.jsonfor iOS and Android builds respectively.When we implement the sending of push notifications we will need to also implement deactivating unregistered tokens.
Closes: #4906
Test Links:
Landing Page
MoreCast
Percentile Calculator
C-Haines
FireCalc
FireCalc bookmark
Auto Spatial Advisory (ASA)
HFI Calculator
SFMS Insights
Fire Watch