Skip to content

Latest commit

 

History

History
53 lines (41 loc) · 2.15 KB

README.md

File metadata and controls

53 lines (41 loc) · 2.15 KB

Android Jumpstart Kotlin

With Android Jumpstart, we want to zero down the scaffolding time for Android apps. Most apps we work on share the same boilerplate code, including

  • Declaring dependencies
  • Auto-increment version code - ToDo
  • Setting up Retrofit for API interaction
  • Setting up Koin for dependency injection
  • Setting up common utility classes
    • LocalStorage (wrapper on SharedPreferences)
    • A themed info dialog
  • Creating a mocking framework for testing- ToDo
  • Push Notification Service- ToDo
  • BaseAdapter for RecyclerViews
  • Setting up Json Serialization and DeSerialization

Jumpstart takes care of all this, and more. Jumpstart adds support for many commonly used libraries,

Setting up

Setting up is really easy, there's a python script here that clones the Jumpstart repo, changes the project name and package name. All the developer needs to after this is the update the API urls and they have a base project ready.

How to use

BaseActivity

Make your activities extend one of BaseActivity, BaseToolbarActivity or BaseDrawerActivity, (all of which subclass AppCompatActivity) depending on your requirements.

Setting up the Navigation Drawer

The BaseDrawerActivity handles the Navigation Drawer setup, and the DrawerActionToggle. You can customize the drawer menu by modifying the file nav_drawer_menu.xml

Setting up the toolbar

The BaseToolbarActivity handles setting up the toolbar and the home as up button. Simply have your classes extend this and there's no need to worry about the toolbar.

TODO Add information about FragmentTransactionHandler

BaseFragment

Similar to BaseActivity, extending BaseFragment gives you access to apiService.

APIProvider

The retrofit configuration is done here.

Build configurations

Jumpstart adds four build types by default, debug, debugProd, release, releaseProd. You should configure these as per your requirements.