Skip to main content

Network capture

Previous version

This page documents Bugsee React Native SDK 6.x (react-native-bugsee), the current stable release. The new 7.x SDK (@bugsee/react-native) is in beta: see Migrating from 6.x to 7.x to evaluate it, or the 7.x overview to start a new integration.

On both Android and iOS Bugsee is capable of capturing network events made either by your JS or platform code. On iOS we automatically install required hooks and no actions should be taken from user space. However, on Android, a single line should be added to the application bootstrap flow to let us intercept network events.

Android

// ...

import com.facebook.react.modules.network.OkHttpClientProvider;
import com.bugsee.BugseeReactPackage;

public class MainApplication extends Application implements ReactApplication {
public MainApplication() {
super();
OkHttpClientProvider.setOkHttpClientFactory(BugseeReactPackage.getDefaultHttpFactory()); // <--- Add this line
}

// ...
}
Found an issue, typo, or wrong statement on this page? Report it now →