- Want motorcycle licence
- Do online trial exams many times to beat exam questions into head (exam UI looks like this)
- Mobile broadband is slow, want stuff to work offline
- Do a bunch of exams with Chrome Developer Tools on side
- Write a python script that does exams and harvests data (in action looks like this)
- Convert harvested data in one long HTML page, that’s useful but not fun (looks like this)
- Get an idea to make an Android app
- Picture illustrations take 50 megabytes
- Try PNG, GIF, JPG with some downsizing, palette reduction etc.
- Picture illustrations take 10-20 megabytes anyway
- Try WebP, pictures fit in 3 megabytes
- Sleep
- Package all questions, answers and illustrations in one sqlite file
- On Android cannot use sqlite file from
/res/raw - Copy sqlite file to SD card on first startup, use it from there
- Android cannot decode WebP out-of-the-box
- Learn about Android NDK
- Learn about JNI
- Write JNI wrapper code, compile libwebp with NDK
- Pictures come from sqlite BLOBs, decodes with native code, show up correctly on screen, very happy
- Make launcher icon in Android Asset Studio
- Publish on market
- Blog about it
Advertisement
Coworkers response – “Super!!!” “Monstrāli!!!” “PIZ*ETS!!!”