This post is about never-ending pursuit of STR… Steps To Reproduce.
How often do you get a bug or issue report with no useful steps to reproduce it? Often I bet. The bug would be something as vague as “something broke”. Thanks.
I don’t know about you, but I find it very annoying. This is more true on Android than on iOS.
Android APIs are an attempt to make everything decoupled and asynchronous. But in many APIs this attempt has failed. Huh? It goes like this: you call an API method, say setAdapter on ListView. And then you are interested in executed some code once ListView reloads and show up something or shows nothing. No so easy. Calls to reload ListView (one of many examples) are asynchronous and you don’t get a notification when the actual UI update has completed. You attach to a scroll listener or a ViewTreeObserver and deal with state. This state dealing when and if something happened in another API call, Android’s questionable lifetime of UI objects, and occasional poor design will lead to app’s internal state (mvars mostly) to be messed up – as in having unanticipated values and side effects.
Even if your testers are great, and they find problems, it’s not likely they will spend time documenting them. People just don’t type these days. But people love videos!
This is where FlightRecorder library comes in. All free, all open source, all 5 or so classes!
FlightRecorder is simple library to record and upload screen sessions while your app runs. It’s meant for your testers while app in beta stage. You probably don’t want it enabled in production. The Android API it’s using will be a serious resource hog and will likely drain battery quickly.
FlightRecorder is based on MediaProjectionManager API which is only available on Lollipop or newer. There are companies providing similar services as this tiny library. These are paid services, but the benefit is portal of your bug posts. And older older devices are also supported. The screen casting on older versions of Android was all DYI with decent amount of work. FlightRecorder comes with basic clip and metadata uploads to Dropbox. Pretty basic stuff.
Another reason why I bothered with FlightRecorder is crash reporting. We all love the free crash reports, with callstacks, from Google play store and from the ***lytics folks. They are all nicely grouped on web portal and quite useful. But sometimes I want see those crashes in action, as they happen, as a video. I want to get values of those mvars I’ve been setting up unwillingly, I want to see some param values before I add that null check statement in my code to prevent the crash. Well, now you can record session video, you can attach to crash handler, you can query you can upload stuff, although not at the time of a crash.
I predict the ***lytic and other crash/issue reporting companies will have screen cast and user app values feature soon. Because it’s useful, because it’s easy, and because it makes sense.
But I’ve coded this first.
All free. All open source.