From fd3e5832a894f82347705197afe850f362cac81a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Sun, 4 Aug 2024 13:59:03 +0200 Subject: [PATCH] Add recommendations for mobile clients MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Guido Günther --- content/appendices.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/content/appendices.md b/content/appendices.md index f9dbb4550..5af315d71 100644 --- a/content/appendices.md +++ b/content/appendices.md @@ -1363,3 +1363,12 @@ following conventions. the tokens returned by `next_batch` and `prev_batch` should contain enough information for subsequent calls to the API to know which page of results they should return. + +## Best Current Practice for Mobile Clients + +In order to save bandwidth and battery mobile clients should: + +- Use [push notifications][/client-server-api##push-notifications] to get notified about new events +- Disable continuous `/sync` calls +- Fetch the events indicted in the push notifications via the ``GET /rooms/{roomId}/event/{eventId}`` API call +- In case the event is encrypted and the necessary keys aren't present, invoke `/sync` to get the needed encryption keys