Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design protocol to wake up Android gateway implementations when the gateway stops running #68

Open
gnarea opened this issue Jul 25, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@gnarea
Copy link
Member

gnarea commented Jul 25, 2020

Executive summary

Android won't let the local Relaynet gateway run unless the user is interacting with it or a Relaynet-compatible app, so the plan is to get the public gateway to ping the Android gateway via a Firebase push notification to get the Android gateway connect to the public gateway to retrieve the new parcel(s).

Describe the solution you'd like

The public gateway will only send a ping message if all the conditions below are true:

  • A new parcel bound for that Android gateway is received.
  • The Android gateway doesn't currently have a WebSocket connection with the public gateway.
  • The public gateway hasn't sent another ping message since the last WebSocket connection.

The gateway is likely to have to display a foreground notification whilst retrieving parcels in the background.

Needless to say that this will be specified in a vendor-neutral manner, so that any public gateway provider with a Firebase account can use this functionality.

Describe any alternatives you've considered

Keep the WebSocket connection open permanently at the expense of a permanent foreground notification, which requires explicit user consent, can be annoying/distracting and drains battery. Having said this, we may still have to implement this as a fallback when connected to public gateways that don't support Firebase push notifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant