AwalaApp / specs

Awala Protocol Suite Specifications
https://specs.awala.network
Creative Commons Attribution Share Alike 4.0 International
5 stars 1 forks source link

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

Open gnarea opened 4 years ago

gnarea commented 4 years ago

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:

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.