All Projects → Commit451 → Lift

Commit451 / Lift

Licence: apache-2.0
Simple Android Application update logic component

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Lift

Paper trail
Track and record all the changes in your database with Ecto. Revert back to anytime in history.
Stars: ✭ 380 (+3700%)
Mutual labels:  versioning, database
Ddia
《Designing Data-Intensive Application》DDIA中文翻译
Stars: ✭ 10,458 (+104480%)
Mutual labels:  database
Realm Dotnet
Realm is a mobile database: a replacement for SQLite & ORMs
Stars: ✭ 927 (+9170%)
Mutual labels:  database
Node Pg Migrate
Node.js database migration management for Postgresql
Stars: ✭ 838 (+8280%)
Mutual labels:  database
Doctrinemigrations
[DEPRECATED] Use Phinx instead
Stars: ✭ 24 (+140%)
Mutual labels:  database
Refreshversions
Life is too short to google for dependencies and versions
Stars: ✭ 841 (+8310%)
Mutual labels:  versioning
Foundationdb4s
Type-safe and idiomatic Scala client for FoundationDB
Stars: ✭ 23 (+130%)
Mutual labels:  database
Flexy Pool
FlexyPool adds metrics and failover strategies to a given Connection Pool, allowing it to resize on demand.
Stars: ✭ 856 (+8460%)
Mutual labels:  database
Walrus
Lightweight Python utilities for working with Redis
Stars: ✭ 846 (+8360%)
Mutual labels:  database
Perfect Redis
A Swift client for Redis.
Stars: ✭ 26 (+160%)
Mutual labels:  database
Taxadb
🐣 locally query the ncbi taxonomy
Stars: ✭ 26 (+160%)
Mutual labels:  database
Swoft Db
[READ ONLY] Database Compoment for Swoft
Stars: ✭ 25 (+150%)
Mutual labels:  database
Oracle Db Examples
Examples of applications and tool usage for Oracle Database
Stars: ✭ 843 (+8330%)
Mutual labels:  database
Influxdb Bundle
Bundle service integration of official influxdb/influxdb-php client
Stars: ✭ 24 (+140%)
Mutual labels:  database
Go Kallax
Kallax is a PostgreSQL typesafe ORM for the Go language.
Stars: ✭ 853 (+8430%)
Mutual labels:  database
Nyaa
Nyaa.se replacement written in golang
Stars: ✭ 924 (+9140%)
Mutual labels:  database
Bgpmon
CSU's BGP Observatory code (bgpmon/pheme)
Stars: ✭ 25 (+150%)
Mutual labels:  database
Docker Oracle 12c R1
Oracle 12c Release 1 with web console and startup initdb
Stars: ✭ 8 (-20%)
Mutual labels:  database
Aurinko2
An XML document database engine implementation in Scala
Stars: ✭ 9 (-10%)
Mutual labels:  database
Graph
Graph is a semantic database that is used to create data-driven applications.
Stars: ✭ 855 (+8450%)
Mutual labels:  database

Lift

Simple Android Application update logic component

Build Status

About

When upgrading a database, you get callbacks such as onUpgrade(oldVersion, newVersion). But, these are only useful and usable when you are dealing with database migrations. What about when you need to upgrade SharedPreferences, switch from SQLite to Realm, etc? Lift aims to fill those gaps and allow an upgrade path for any possible app version upgrade you might need, making use of the apps version code.

Usage

//Within Application.onCreate()
Lift.check(this, { oldVersion, newVersion ->
    if (oldVersion == Lift.VERSION_NOT_STORED) {
        Toast.makeText(this@App, "This must be a first app launch. Nice", Toast.LENGTH_SHORT)
                .show()
    } else if (oldVersion == 100 && newVersion == 101) {
        Toast.makeText(this@App, "Upgrading from 100 to 101", Toast.LENGTH_SHORT)
                .show()
    }
})

Even if you do not have a needed upgrade right away, you should add the check and callback to your app so that it starts tracking the current version of the app for when you do eventually want to provide an upgrade.

Auto Backup

If you are using auto backup, you will want to add rules for Lift. See the sample project for a full example, but it should look like this:

Change your manifest to android:fullBackupContent="@xml/my_backup_rules"

And your my_backup_rules should look like:

<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
    <exclude domain="sharedpref" path="lift.xml"/>
</full-backup-content>

Note

Due to the way that the version is stored in SharedPreferences, if you are adding Lift to an existing app, and also for the first time the user launches your app, the first callback will have the oldVersion value is equal to VERSION_NOT_STORED (-1). Make sure you are accounting for this as needed

License

Copyright 2017 Commit 451

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].