Venolio

Set up push notifications for Android

For administrators

Without any setup, the Android app shows a server’s notifications (mentions, reminders, chat messages and the rest of the Inbox) after each sync while the app runs. With push notifications, phones signed in to your server receive them at once, also while Venolio is closed.

Push on Android goes through Google’s Firebase Cloud Messaging. Venolio has no push service and no Firebase project of its own: you create a free Firebase project for your organisation, and your server talks to Google with it directly. Nothing of this runs until you fill in the settings.

Before you start

  • A Google account of your organisation, to create the Firebase project.
  • Phones need Google Play services. Phones without them (some Android builds without Google services) keep showing notifications after a sync while the app runs.

Create the Firebase project

  1. Open the Firebase console at https://console.firebase.google.com and create a project. Google Analytics is not needed; you can leave it off.
  2. In the project, add an Android app with the package name io.venol.app. A nickname is optional and no SHA-1 certificate is needed. You do not need to download google-services.json or add anything to an app: click through the remaining steps.
  3. In Project settings → General, note the Project ID (for example my-team-12ab3), the Android app’s App ID under Your apps (it looks like 1:123456789012:android:0a1b2c3d4e5f) and the Web API key. If the page shows no Web API key, use current_key from the Android app’s google-services.json, which the same page offers for download.
  4. In Project settings → Cloud Messaging, make sure Firebase Cloud Messaging API (V1) is enabled, and note the Sender ID (the project number, also the number in the App ID).
  5. In Project settings → Service accounts, click Generate new private key. Your browser downloads a JSON file. It is a credential: treat it like a password, and delete the download once it is saved in Venolio.

Enter the settings in Venolio

  1. Open Settings → Push notifications (#/settings/push).
  2. Fill in every field:
Group Field What to enter
Firebase project Project ID The project’s ID. Lowercase letters, digits and hyphens.
Firebase project Service account key (JSON) The whole JSON file from step 5, pasted in. Stored encrypted and never shown again.
Android app App ID The Android app’s App ID.
Android app Web API key The project’s Web API key. It identifies the project and is not a secret: the phones receive it.
Android app Sender ID (project number) The number from Cloud Messaging.
What is sent Include notification text in pushes Off by default. See What passes through Google.
  1. Click Save.

Saving checks each value. The service account key must be the JSON file of a service account, with its e-mail address, an RSA private key and Google’s token address; a key of another kind is refused with the reason.

Phones pick up the settings on their next sync, or when someone opens Settings → Notifications in the app, and register with your server. From then on they receive push notifications.

The status

The Status card at the top of the section shows:

  • Set up or Not set up, and which fields are still missing,
  • settings that cannot work together, such as a service account key of another project,
  • how many phones are registered,
  • when the last push was delivered,
  • the last problem, with its date.

What passes through Google

From To What
Your server The phones The Project ID, App ID, Web API key and Sender ID: the project’s public values. Never the service account key.
A phone Google What Firebase needs to give the phone a token: the project’s public values and an installation ID.
A phone Your server The phone’s Firebase token. The server stores it encrypted.
Your server Google A sign-in signed with the service account key, about once an hour, and one message for each notification and phone.
Google The phone The message, delivered by Google Play services.

Each message carries the phone’s token, the server’s and the notification’s IDs, and this text:

  • Include notification text in pushes off (the default): “New activity in Venolio” and your server’s name. Google learns that something happened, not what.
  • On: the notification’s title, such as “Alex Morgan mentioned you in Roadmap” or “New message from Alex Morgan”, and your server’s name. The title then passes through Google.

The notification’s body, such as the text of a comment, is never sent, and chat messages cannot be: they are end-to-end encrypted. A tap on a push opens Venolio on your server’s space, on the Inbox, where the app reads the notification from your server.

Who gets a push

  • Only the person the notification is for, on the phones they signed in to your server. A person can register up to 10 phones.
  • Only notifications created after the phone registered and less than an hour old. A server that was down, or had no push settings, sends no backlog.
  • Before each push the server checks again that the person can still open the page the notification is about. A page that became private or went to the trash sends nothing.
  • A push that fails is tried again a few times over the next minutes, then given up; the problem shows in the status.

A phone’s registration ends when the phone signs out, when its person removes it under Devices, and when its session ends.

Turn push off

Clear the fields and save. The server stops sending at once, and each phone removes its Firebase token on its next sync. You can also delete the Firebase project in the Firebase console.

About this part of Venolio: Your server, your data, your rules

Checked against the app on . The same help is built into the Venolio apps and works offline. Something wrong or missing? Tell us.