Introducing and Open Sourcing Shaky

Android Shake-for-Feedback Library

August 3, 2016

At LinkedIn, we release incremental versions of our apps internally first, in order to deliver a better experience to our members—a practice known as “dogfooding." Some bugs are hard to catch until an app is used by enough people. That’s why employees often find bugs developers miss. In the past, when an employee noticed something was broken, he or she would have to create a ticket and attach relevant information to it. This process can be especially difficult on a mobile phone, so many bugs went unreported. In addition, users can only report what they saw and did, which is not always enough useful information for a developer. We needed a seamless way for employees to report their findings within our new mobile app.

To solve this problem, the mobile infrastructure team created Shaky, an Android shake-for-feedback library, which we are open sourcing today.

Initial dialog prompt

Introducing Shaky

The Shaky library provides an on-demand, shake-to-send-feedback form to report bugs. Now, users don’t have to navigate away from the screen where things went wrong. When a user shakes their device, Shaky automatically captures relevant app information, including a screenshot, a log, and the most recent pages the user visited. Shaky's API can also be extended to capture even more app-specific information. With just a few lines of code, developers can get their own feedback reporting flow. This includes the initial dialog, the type of feedback, a screenshot of the app (which users can draw on to show what’s wrong), and a submission form that asks the user to describe the bug.

Shaky feedback flow

Shaky was heavily inspired by the shake-to-send-feedback feature in Google Maps. At an implementation level, it uses Square’s Seismic to detect device shakes and kick off the feedback flow. While there are more robust closed-source solutions, we wanted to create a simpler and extensible alternative.

Over the last year, more than 5,000 internal features and bugs have been reported by LinkedIn employees using Shaky. Because Shaky has been so helpful for us, we’ve decided to open source the project so that developers can easily add this functionality to their own apps. Shaky has two primary users: people who interact with the UI, and developers who implement the API. We wanted both the feedback flow and the API to be easy-to-use and extensible. By open sourcing Shaky, we hope to improve the library for everyone who uses it.

It can be difficult to find UI bugs that pass tests and don’t throw exceptions. Users will often find problems that developers might miss but if the bug reporting process is too difficult, developers might miss out on this helpful user feedback. With Shaky, implementing your own shake-for-feedback form is a breeze. Fork us on Github. Pull requests are welcomed. And stay tuned for more Android libraries.