Skip to content

Instantly share code, notes, and snippets.

@ramonaharrison
Created November 20, 2016 19:21
Show Gist options
  • Save ramonaharrison/6b85f5339a8f591be79c5f317eadca02 to your computer and use it in GitHub Desktop.
Save ramonaharrison/6b85f5339a8f591be79c5f317eadca02 to your computer and use it in GitHub Desktop.

Spy on your Access Cats database with Stetho

  1. Add Stetho to your app/build.gradle dependencies:
dependencies {
    // ...

    // Cupboard
    compile 'nl.qbusict:cupboard:2.1.4'

    // Stetho
    compile 'com.facebook.stetho:stetho:1.4.1'
}

  1. Create a class AccessCatsApplication extends Application and initialize Stetho in your onCreate() method:
public class AccessCatsApplication extends Application {
    public void onCreate() {
        super.onCreate();
        Stetho.initializeWithDefaults(this);
    }
}

Add the AccessCatsApplication class in your AndroidManifest.xml file:

// ...

    <application
        android:allowBackup="true"
        android:name=".AccessCatsApplication"
        
        // ...
  1. Run your app, open Chrome and navigate to chrome://inspect . Click on your device name to inspect, then open the Resources panel. Use the menu on the left to navigate to your database file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment