element-hq / element-hq/element-android

Element Android configuration file

Open
#2,180 1 comment 0 reactions 0 assignees View on GitHub
Z-parity-with-web
Dominant language
Kotlin
Stars
3.7k
Forks
917
PR merge metrics
No merged PRs in 30d

Description

We need a way to propose internal upgrade of the application. We often have users who report bug from old version, and also it can be a way to show the new things.

A popup will be displayed, blocking if current application is late regarding `mandatory` section, and not blocking in other cases. Two possible actions: "upgrade", which open the store and "later" which dismiss the popup, only in case of non mandatory upgrade.

## Element Web

image

## Host config file

Host a configuration file in https://element.io/mobile/im.vector.app.json (see with Ops what could be the most appropriate place. Ideally the mobile team could be able to edit this static file a few days after each release).

## Content

This file should content the most recent version of the app, and if the update is recommended, or mandatory.

Also a dedicated section in the file (or a dedicvated file?) for F-Droid should be created.

Maybe add more section, on per applicationId, for the day we will manage several application Id.

So for instance we could have:

```json
{
"gplay":{
"minimumClientVersion":{
"mandatory":{
"minVersionCode":4010006,
"minVersionName":"1.0.6",
"message":{
"default":"A new version is available, please update your application",
"fr":"Une nouvelle version est disponible, veuillez mettre à jour votre application"
},
"allowOpeningApp":false
},
"info":{
"minVersionCode":4010008,
"minVersionName":"1.0.8",
"message":{
"default":"A new version is available!",
"fr":"Une nouvelle version est disponible!"
},
"changelogUrl":"https://github.com/vector-im/element-android/releases/tag/v1.0.8",
"displayOnlyOnce":true,
"allowOpeningApp":true
}
}
},
"fdroid":{
"minimumClientVersion":{
"mandatory":{
"minVersionCode":4010006,
"minVersionName":"1.0.6",
"message":{
"default":"A new version is available, please update your application",
"fr":"Une nouvelle version est disponible, veuillez mettre à jour votre application"
},
"allowOpeningApp":false
},
"info":{
"minVersionCode":4010008,
"minVersionName":"1.0.8",
"message":{
"default":"A new version is available!",
"fr":"Une nouvelle version est disponible!"
},
"changelogUrl":"https://github.com/vector-im/element-android/releases/tag/v1.0.8",
"displayOnlyOnce":true,
"allowOpeningApp":true
}
}
}
}
```

Every fields are optional, but in some case it will be useless.

Version code does not include the arch digit. App should take that into account.

## Implementation

The file will be downloaded using the RawService, with a 24 hours cache duration.

## Ref

We can get inspired by what have been implemented for Tchap (see https://github.com/dinsic-pim/tchap-android/pull/554)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.