Create android kotlin app by template.
Branch: master
Clone or download
Latest commit aaf1a9e Jan 27, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Upgrade stuffs Jan 27, 2019
backend Upgrade stuffs Jan 27, 2019
.gitignore Update gitignore file Jul 26, 2018
LICENSE Add license file Jul 26, 2018 Update Oct 8, 2018
build.gradle Upgrade stuffs Jan 27, 2019 Update creator script Jul 27, 2018 Upgrade stuffs Jan 27, 2019
gradlew Initial commit of refactoring Jul 25, 2018
gradlew.bat Initial commit of refactoring Jul 25, 2018
settings.gradle Tidy up the gradle scripts Jul 26, 2018


This is an android application template project built with kotlin language and some useful libraries. It provides a creator script to quickly create an project from template.

Creating project

Make sure you have installed Python 3 and requests library before proceeding. And then paste the following command at a terminal, replace the PROJECT_NAME and APP_PACKAGE_NAME and execute it:

python3 -c \
"$(curl -fsSL" \

What is included

The template project imports the Meepo library to create activity & broadcast routers. And use kotlin language sugars to make their usages simpler. For example:

// Goto a new activity

// Broadcast a action

// Receiver a broadcast
registerLocalReceiver({ _, intent ->
    val action = (intent ?: return@registerLocalReceiver).action
            ?: return@registerLocalReceiver
    when (action) {
        "ACTION_XXX" -> {
            // Do sth

Sending a network request in this project is also simple:

gankIoService().picApi.getMeiziPics(1, 0)
    // ...

And the network operations are separated into a submodule. Some tests are created for them:

class GankIoServiceTest {
    private val gankIoService = GankIoService(OkHttpClient(), Gson())

    fun getMeiziPics() {
        gankIoService.picApi.getMeiziPics(10, 0)
                .assertValue { response ->
                    !response.error && response.results.size == 10

In addition, it creates some extention methods for AutoDispose so that you can automatically dispose your rx stream more conveniently:

// ... Rx stream

For more details, you can look at the code of template directly.