From 87f739607e58cb52e03b1d1c9b7f97596d8762ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fazekas=20D=C3=A1niel?= Date: Thu, 27 May 2021 03:14:48 -0700 Subject: [PATCH] docs: update network-plugin.mdx android (#2368) Summary: Flipper network plugin does not work without the above added lines. Without the added lines, the network plugin simply does not work on Android with Flipper version 0.91.0. I found this solution in your example react-native project. This should be stated in the docs. ## Changelog This should not be stated in changelog. Pull Request resolved: https://github.com/facebook/flipper/pull/2368 Test Plan: There is no code. Reviewed By: passy Differential Revision: D28714451 Pulled By: nikoant fbshipit-source-id: 81583fcf590e1c603d67bcb649067393455549cc --- docs/setup/network-plugin.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/setup/network-plugin.mdx b/docs/setup/network-plugin.mdx index 11cea0850..351781a67 100644 --- a/docs/setup/network-plugin.mdx +++ b/docs/setup/network-plugin.mdx @@ -26,6 +26,12 @@ the client: import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); +new NetworkingModule.CustomClientBuilder() { + @Override + public void apply(OkHttpClient.Builder builder) { + builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); + } +}); client.addPlugin(networkFlipperPlugin); ```