Add databases plugin v0 (android) (#441)

Summary:
Adds a plugin for listing the databases, tables and contents of those tables in an android app.
Right now, works with sqlite, but it should be generic enough to work with other db types.

## Changelog

Add initial version of android databases plugin

Creating a PR, I may need to do some cleaning up, but this is to kick off that process.
Pull Request resolved: https://github.com/facebook/flipper/pull/441

Reviewed By: danielbuechele

Differential Revision: D15288831

Pulled By: jknoxville

fbshipit-source-id: 6379ad60d640ea6b0a9473acc03dd6ea81a3a8d4
This commit is contained in:
John Knox
2019-05-28 10:10:31 -07:00
committed by Facebook Github Bot
parent f20a781bca
commit a630b50a8f
27 changed files with 2738 additions and 21 deletions

View File

@@ -1,14 +1,15 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.facebook.flipper.sample;
import android.content.Context;
import com.facebook.flipper.core.FlipperClient;
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
import com.facebook.flipper.plugins.example.ExampleFlipperPlugin;
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
@@ -51,6 +52,7 @@ public final class FlipperInitializer {
client.addPlugin(new FrescoFlipperPlugin());
client.addPlugin(new ExampleFlipperPlugin());
client.addPlugin(CrashReporterPlugin.getInstance());
client.addPlugin(new DatabasesFlipperPlugin(context));
client.start();
final OkHttpClient okHttpClient =