Java Code Examples for com.facebook.flipper.core.FlipperClient#addPlugin()
The following examples show how to use
com.facebook.flipper.core.FlipperClient#addPlugin() .
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: LithoSampleApplication.java From litho with Apache License 2.0 | 6 votes |
@Override public void onCreate() { super.onCreate(); Fresco.initialize(this); SoLoader.init(this, false); if (FlipperUtils.shouldEnableFlipper(this)) { final FlipperClient client = AndroidFlipperClient.getInstance(this); final DescriptorMapping descriptorMapping = DescriptorMapping.withDefaults(); LithoFlipperDescriptors.add(descriptorMapping); client.addPlugin(new InspectorFlipperPlugin(this, descriptorMapping)); client.addPlugin(new SectionsFlipperPlugin(true)); client.start(); } }
Example 2
Source File: FlipperManager.java From zephyr with MIT License | 6 votes |
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; }