aws-samples / aws-samples/serverless-mobile-push-notification
Supporting users with multiple devices on same mobileOS?
- Dominant language
- Python
- Stars
- 10
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
The [article](https://aws.amazon.com/blogs/compute/sending-mobile-push-notifications-and-managing-device-tokens-with-serverless-application/) that points to this repo states:
> Mobile applications can have many users, **each user could have multiple devices**, or one device could have multiple users. To send a push notification to a specific user, a mapping between the user, device, and platform endpoints should be maintained.
However, in the implementation, the table to store endpoints uses `username` and `mobileOS` to form its key, where `mobileOS` could be a value like `iOS`. Unless I'm missing something, this means that it can only store a single endpoint for a given `mobileOS` and `username` combination. What if the user has the same app installed on their iPhone and iPad (not an uncommon scenario). Is it right to assume that this implementation would only store an endpoint (and thus only send pushes to) whichever of those two devices they most recently logged into? That doesn't seem right to me. As a user, I'd expect to be notified on both devices.
Am I interpreting this correctly. Does this implementation only support a single device, per user, per mobile platform? What if we want to notify the user on all of their devices that are active?
Contributor guide
Assessment
This issue has not been assessed yet.