DEV Community

Cover image for Showify Tv Shows App | Requestly Android Interceptor
MOHIT GUPTA
MOHIT GUPTA

Posted on

2 1

Showify Tv Shows App | Requestly Android Interceptor

Hello guys, today I learn Dependency Injection (Dagger-Hilt) for Android with that I build a simple Android app Showify using MVVM Architecture Android.
Showify is simple app which fetch Movies, TV shows details and show them into Recycler View.

Also to debug my API responses I use Requestly debugger which Open Source SDK, with that I can Intercept my API request/response, In-App without dealing with SSL certificate and proxy issues.

Benifits of using Requestly Debugger

  • Open Source
  • Simple 1-time integration (No Proxy or SSL certificate hassles)
  • In-APP and Web Service Interceptor
  • APIs Modifications Possible
  • Also Debug production apps
  • Active support

We can integrate Requestly debugger SDK simply in 2 setps and with 3 lines of code.

Steps to Integrate Requestly

Step 1:- Add the dependency into your build(app) file.

dependencies {
debugImplementation "io.requestly.rqinterceptor:library:1.+"
releaseImplementation "io.requestly.rqinterceptor:library-no-op:1.+"
}

Step 2:- Add these 3 lines code into your Network Module.

val collector = RQCollector(context=appContext, sdkKey="<your-sdk-key>")
val rqInterceptor = RQInterceptor.Builder(appContext)
.collector(collector)
.build()
val client = OkHttpClient.Builder()
.addInterceptor(rqInterceptor)
.build()

If you are using retrofit then simply pass okHttpClient into retrofit client.

Retrofit.Builder()
.baseUrl(APIUtils.API_BASE_URI)
.client(okHttpClient) // okHttpClient with RQInterceptor
.build();

That's all now you can Intercept your the API responses into your app or into requestly web app.

Image description

Thanks for reading this through.
Have a wonderful Day.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay