MaintenanceKit is a simple framework to help with determining one of the following conditions:
- If a server is down and in maintenance mode
- If there is an app update available
- This library is published to Github Packages via Gradle Mavenizer
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
MaintenanceKit allows for a simple and convenient way to handle checking for app updates. You specify the latest version and the minimum functioning version of the app in the JSON file along with a build number. There are two ways of determining the version, and that is either by the version string (1.0.0) or the build number (22)
Simply call the check for updates function in the MaintenanceService class to check for updates for the current app.
Maintenance mode is as simple as calling a function and checking returned parameters. There are two types of maintenance. Offline and online maintenance. You can set the type inside of the JSON file.
The JSOn response contains two optional root nodes .
- upgrade
- maintenance
Upgrades: Upgrades consist of an array of platforms. Currently only iOS, macOS and Android are supported, future versions may introduce additional platforms.
Maintenance: Maintenance is simple information regarding potential downtime or active downtime.
Each platform can contain a nullable message dictionary containing two keys, title and body. This can be used to help clarify to users what is happening in a maintenance release or new app update.
{
"upgrade": {
"platforms": [{
"platform": "ios",
"latest_version": "1.0.0",
"latest_build_number": 21,
"store_url": "https://...",
"minimum_version": "1.0.0",
"minimum_build_number": 21,
"required_update": false,
"show_version_info": false,
"message": {
"title": "Upgrade Title",
"body": "Upgrade Description"
}
}]
},
"maintenance": {
"active": true,
"offline": true,
"scheduled": false,
"start_date": "ISO-8601 UTC Date",
"end_date": "ISO-8601 UTC Date",
"message": {
"title": "Upgrade Title",
"body": "Upgrade Description"
}
}
}
Android Maintenance Kit is Copyright © 2017-2020 UpTech Works, LLC. It is free software, and
may be redistributed under the terms specified in the LICENSE file.
Android Maintenance Kit is maintained and funded by UpTech Works, LLC, a
software product, design & development consultancy.
We love open source software. See our other projects or hire us to design, develop, and grow your product.
