Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

[Android] Mocked the response , but not getting reflected at device. #5639

Open
sumit-jha-Pw opened this issue Jun 20, 2024 · 0 comments
Open

Comments

@sumit-jha-Pw
Copy link

sumit-jha-Pw commented Jun 20, 2024

🐛 Bug Report

Have used this peace of code :-
`object FlipperDebugger {

val networkFlipper = NetworkFlipperPlugin()
fun initialize(context: Context) {
    SoLoader.init(context, false)
    val client = AndroidFlipperClient.getInstance(context)
    client.addPlugin(InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()))
    client.addPlugin(CrashReporterPlugin.getInstance())
    client.addPlugin(DatabasesFlipperPlugin(context))
    LeakCanary.config = LeakCanary.config.run {
        copy(eventListeners = eventListeners + FlipperLeakEventListener())
    }
    client.addPlugin(networkFlipper)
    client.addPlugin(LeakCanary2FlipperPlugin())
    client.start()
}

}andhttpClient.addNetworkInterceptor(FlipperOkhttpInterceptor(FlipperDebugger.networkFlipper,true))`
Attached image for mocked api
Screenshot 2024-06-20 at 1 20 47 PM

But when this API is hit again then no mocked response shown
Using flipper-> 0.250.0
have added all dependency
debugImplementation "com.facebook.flipper:flipper:$flipper" debugImplementation "com.facebook.soloader:soloader:$soLoader" debugImplementation "com.facebook.flipper:flipper-leakcanary2-plugin:$flipper" debugImplementation "com.facebook.flipper:flipper-network-plugin:$flipper"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant