Flipper で SQLite テーブルを直接見る

Stetho の Facebook が作成した Android / iOS どちらも使えるデバッグツールです。

👉 Open-sourcing Flipper: a new extensible debugging tool - Facebook Engineering 

👉 Flipper · Extensible mobile app debugging 

👉 facebook/flipper: A desktop debugging platform for mobile developers. 

We wanted to create a platform that gives us all the flexibility we need to build more advanced features and support for iOS. One of Flipper's core concepts is its extensibility using plugins. Plugins are written in React and we provide a set of ready-to-use UI components that allow developers to build great plugin UIs with a few lines of code.

iOSのより高度な機能とサポートを構築するために必要なすべての柔軟性を提供するプラットフォームを作成したかったのです。 Flipperのコアコンセプトの1つは、プラグインを使用した拡張性です。プラグインはReactで記述されており、開発者が数行のコードで優れたプラグインUIを構築できる、すぐに使用できるUIコンポーネントのセットを提供します。

👉 Stetho Guidance · Flipper 

dependencies、Application 内に記述しながら、セットアップ。


<activity android:name="com.facebook.flipper.android.diagnostics.FlipperDiagnosticActivity"
        android:exported="true"/>


repositories {
  jcenter()
}

dependencies {
  debugImplementation 'com.facebook.flipper:flipper:0.26.0'
  debugImplementation 'com.facebook.soloader:soloader:0.5.1'
  releaseImplementation 'com.facebook.flipper:flipper-noop:0.26.0'
}


public class MyApplication extends Application {

  @Override
  public void onCreate() {
    super.onCreate();
    SoLoader.init(this, false);

    if (BuildConfig.DEBUG && FlipperUtils.shouldEnableFlipper(this)) {
      final FlipperClient client = AndroidFlipperClient.getInstance(this);
      client.addPlugin(new InspectorFlipperPlugin(this, DescriptorMapping.withDefaults()));
      client.start();
    }
  }
}

👉 Getting Started · Flipper 

ここでは Database プラグインを追加します。


client.addPlugin(new DatabasesFlipperPlugin(context));

👉 Databases Plugin Setup · Flipper 

あとは、PC上のデバッグクライアントを開くと直感的に参照できるようになります。

👉 android/architecture-samples at dagger-android 

使いやすいです。動作も軽快です。