It is usually desired that users always have the latest version of the software. Messages can be used to notify only those users that run older versions of the application, providing details where updates can be obtained and what’s new.
You can also automate the process of updates by providing a link to the new version in the message, and perform the download and update automatically in the application. In this tutorial, we will focus on simply letting users know an update is available and where to get it.
It is also quite common to offers users the possibility to choose what type of updates they want. Some may prefer to only get the stable ones, whereas others want the newest features first and accept that there may be some bugs. We can solve this by grouping our updates notifications into stable and experimental channels.
Let’s suppose the user is listening on the stable branch and we want to show them the recent message if such exists. Then, we can use the code below. Remember that this method requires a separate access token with ‘GetMessages’ permission, which can be created here.
The variable currentVersion
is the date when you published this release (in unix timestamp format). Each time you update the application, you need to remember to update this value.
The easiest way to obtain the unix timestamp is by visiting this link or, if you are on Linux or macOS, type the following in the terminal:
In .NET, this can be done using DateTimeOffset
as follows:
In Python, this can be done with datetime
:
New messages can be sent on this page. You can also use our API endpoint.
It is usually desired that users always have the latest version of the software. Messages can be used to notify only those users that run older versions of the application, providing details where updates can be obtained and what’s new.
You can also automate the process of updates by providing a link to the new version in the message, and perform the download and update automatically in the application. In this tutorial, we will focus on simply letting users know an update is available and where to get it.
It is also quite common to offers users the possibility to choose what type of updates they want. Some may prefer to only get the stable ones, whereas others want the newest features first and accept that there may be some bugs. We can solve this by grouping our updates notifications into stable and experimental channels.
Let’s suppose the user is listening on the stable branch and we want to show them the recent message if such exists. Then, we can use the code below. Remember that this method requires a separate access token with ‘GetMessages’ permission, which can be created here.
The variable currentVersion
is the date when you published this release (in unix timestamp format). Each time you update the application, you need to remember to update this value.
The easiest way to obtain the unix timestamp is by visiting this link or, if you are on Linux or macOS, type the following in the terminal:
In .NET, this can be done using DateTimeOffset
as follows:
In Python, this can be done with datetime
:
New messages can be sent on this page. You can also use our API endpoint.