Code example for BasicScheme

0
                                        ClientContext.CREDS_PROVIDER);
                                HttpHost targetHost = (HttpHost) context.getAttribute(ExecutionContext.HTTP_TARGET_HOST);
 
                                if (authState.getAuthScheme() == null) {
                                    AuthScope authScope = new AuthScope(targetHost.getHostName(), targetHost.getPort());
                                    authState.setAuthScheme(new BasicScheme());
                                    authState.setCredentials(creds);
                                } 
                            } 
                        }; 
 
                        dhc.addRequestInterceptor(preemptiveAuth, 0);
                    } 
                } 
                else { 
                    Log.w(TDDatabase.TAG, "Unable to parse user info, not setting credentials");
                } 
            } 
 
            try { 
Connect your IDE to all the code out there  Get Codota for Java