com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin Java Examples

The following examples show how to use com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FlutterFlipperkitPlugin.java    From flutter_flipperkit with MIT License 6 votes vote down vote up
private void setupChannel(BinaryMessenger messenger, Context context) {
    this.context = context;
    SoLoader.init(context.getApplicationContext(), false);
    if (BuildConfig.DEBUG && FlipperUtils.shouldEnableFlipper(context)) {
        flipperClient = AndroidFlipperClient.getInstance(context);
        networkFlipperPlugin = new NetworkFlipperPlugin();
        sharedPreferencesFlipperPlugin = new SharedPreferencesFlipperPlugin(context, "FlutterSharedPreferences");

        flipperDatabaseBrowserPlugin = new FlipperDatabaseBrowserPlugin();
        flipperReduxInspectorPlugin = new FlipperReduxInspectorPlugin();
    }

    this.channel = new MethodChannel(messenger, CHANNEL_NAME);
    this.channel.setMethodCallHandler(this);

    this.eventChannel = new EventChannel(messenger, EVENT_CHANNEL_NAME);
    this.eventChannel.setStreamHandler(this);
}
 
Example #2
Source File: FlipperManager.java    From zephyr with MIT License 6 votes vote down vote up
public FlipperManager(@NonNull Context context) {
    SoLoader.init(context, false);

    final FlipperClient flipperClient = AndroidFlipperClient.getInstance(context);
    final DescriptorMapping descriptorMapping = DescriptorMapping.withDefaults();

    final NetworkFlipperPlugin networkPlugin = new NetworkFlipperPlugin();
    mOkHttpInterceptor = new FlipperOkhttpInterceptor(networkPlugin, true);

    flipperClient.addPlugin(new InspectorFlipperPlugin(context, descriptorMapping));
    flipperClient.addPlugin(networkPlugin);
    flipperClient.addPlugin(new SharedPreferencesFlipperPlugin(context));
    flipperClient.addPlugin(CrashReporterPlugin.getInstance());
    flipperClient.addPlugin(new DatabasesFlipperPlugin(context));
    flipperClient.addPlugin(NavigationFlipperPlugin.getInstance());
    flipperClient.start();

    mIsInitialized = true;
}