Here is my singleton class.
public class GetRetrofit {
static volatile Retrofit retrofit = null;
public static Retrofit getInstance() {
    if (retrofit == null) {
        synchronized (GetRetrofit.class) {
            if (retrofit == null) {
                OkHttpClient.Builder builder = new OkHttpClient().newBuilder();
                builder.readTimeout(30, TimeUnit.SECONDS);
                builder.connectTimeout(30, TimeUnit.SECONDS);
                HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
                interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
                builder.addInterceptor(interceptor);
                //  builder.addInterceptor(new UnauthorisedInterceptor(context));
                OkHttpClient client = builder.build();
                retrofit =
                        new Retrofit.Builder().baseUrl("DYNAMIC_URL")
                                .client(client).addConverterFactory(GsonConverterFactory.create()).build();
                //addConverterFactory(SimpleXmlConverterFactory.create())
            }
        }
    }
    return retrofit;
}
}
I want to change dynamic base url.
e.g : http://192.168.1.60:8888/property/Apiv1 need to change this url in run time http://192.168.1.50:8008/inventory/Apiv1.
How can i change this two url dynamically in runtime. Please help me.
 
    