Overview
Below is more or less the log entries of my journey in building my Android application, iTransit. I build it from scratch and put it on Google Play Store. It took me 1 month.
It is an offiline application that displays bus and metro time in Montreal city.
What I learned while developing the app, I wrote them as tutorials below. They might be helpful for other people to know what are the skills needed to build an Android application.
Developing app for mobile device has a lot of constraints. First, the screen is small. So you can not pack gazillion of fields. Thus, avoiding convoluted functionalities. Second, your app should not be big in size. Otherwise, it takes a lot more time for the users to download your app. I have to reduce my database from ~240MB to ~30 MB. Third, CPU power is limited. It forces you to rethink about your processes and questionning the need of each of them. Hence, it forces you to make simple processes. Lastly, everything is broken down into smaller chuncks. Therefore, coding is less complex and enjoyable. KISS principle at its finest here!
This tutorial is a work in progress
As I have time, I will write tutorial and link it here
Android Studio
- Install Android Studio
- Don't use Virtual Device, it is slow. 32bit on 64bit machine.
- Where are the project files structure.
- Debugging/Logging
Layout
- Concept
- LinearLayout
- ListView
Navigation between screens
- Passing data between 1 screen to another
- Navigation bar
Data Storage
- Store and retrieve data from SQLite in Android
- Storing data in Android using SharedPreferences API
- Ship an Android application with an existing database
Performance with Layout
Shrink database
- Shrink database file size from 254MB to 34MB, see Reduce SQLite database size for Android.
Put ad in your application
- Add AdMob
Branding
- Add logo
Upload to Google Play Store
- Build APK
- You have to pay $25 USD to Google to be listed on Play Store.
Scrolling
Upgrade database
- Install old APK file
- Use Toast to warn users that the time schedule is old and needs an upgrade: Use Toast to display warning message in Android
- Database upgrade strategy for the extended class of SQLiteOpenHelper