Corey Johnson
Jan 29 · 1 min read

Hey Ankit! This is a great part 2 in the series! I would recommend using a String constant for your baseUrl in RetrofitClient. This allows you to do something like this:

private final String baseUrl = BuildConfig.DEBUG ? “http://mydebugurl.com” : “http://myreleaseurl.com”;

This is helpful for if you have an endpoint for staging/development, and if you have a separate one for release builds!

    Corey Johnson

    Written by

    Android Developer who is enthusiastic about education and user experiences!