I'm new to Android programming. I am going to make lots of HTTP requests: 500, 1k, 2k, 10k.
I have tried to create a singleton class for OkHttp. I wrote this:
public class OkSingleton extends OkHttpClient {
private static OkSingleton minstance;
private final OkHttpClient myClient;
private OkSingleton (){
myClient= new OkHttpClient();
}
public static synchronized OkSingleton getMinstance(){
if (minstance==null){
minstance=new OkSingleton();
}
return minstance;
}}
Can you show me my mistakes?