Skip to content
Shake to send feedback for Android.
Branch: master
Clone or download
Drew Hannay
Latest commit 002c61f Nov 28, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
buildSrc
config/checkstyle Initial commit Aug 3, 2016
gradle/wrapper
shaky-sample
shaky
.gitignore Initial commit Aug 3, 2016
.travis.yml Update compileSdk and targetSdk (#24) Sep 25, 2018
CHANGELOG.md
CONTRIBUTING.md Initial commit Aug 3, 2016
LICENSE Initial commit Aug 3, 2016
NOTICE
README.md
RELEASING.md
build.gradle
gradle.properties
gradlew
gradlew.bat
screenshot.png
settings.gradle

README.md

Shaky

Build Status

Shake-to-feedback plugin for Android.

Shaky dialog prompt

Inspired by Google Maps' Shake to feedback and based on Square's seismic.

Download

Download the latest .aar via Maven:

	<dependency>
	  <groupId>com.linkedin.shaky</groupId>
	  <artifactId>shaky</artifactId>
	  <version>2.0.1</version>
	</dependency>

or Gradle:

	implementation 'com.linkedin.shaky:shaky:2.0.1'

Getting Started

Add the following to your AndroidManifest.xml application tag:

    <provider
        android:name="android.support.v4.content.FileProvider"
        android:authorities="${applicationId}.fileprovider"
        android:exported="false"
        android:grantUriPermissions="true">
        <meta-data
            android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/filepaths"/>
    </provider>

Create the corresponding res/xml/filepaths.xml resource:

<paths>
    <files-path name="files" path="."/>
</paths>

This allows files captured by Shaky to be shared with external apps. In this case, whatever app picks up the email Intent. Note: you only need these xml permissions to share files with external apps. For more information see FileProvider.

In your Application subclass:

    public class ShakyApplication extends Application {
        @Override
        public void onCreate() {
            super.onCreate();
            Shaky.with(this, new EmailShakeDelegate("hello@world.com"));
        }
    }

For a complete example, see the demo app.

Advanced Usage

Your app can define custom behavior by subclassing ShakeDelegate and implementing the void submit(Activity, FeedbackResult) method (e.g. to send the data to a custom server endpoint).

In addition, you can implement the Bundle collectData() to collect extra app data including device logs, user data, etc. You will also need to handle how to send the extra data collected in your submit method.

If you want to programmatically trigger the feedback collection flow, rather than listening for shake events, you can call Shaky#startFeedbackFlow() on the object returned by Shaky.with(). See the demo app for a full example of how to do this.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.