I\'m using a Videoview to play http video.That Http video url needs Authentication.
So please let me know how authentication can be
There is a hidden method in VideoView that allows setting HTTP headers. You can use reflection to access it. But it will only help if the server supports basic authentication
Method setVideoURIMethod = videoView.getClass().getMethod("setVideoURI", Uri.class, Map.class);
Map params = new HashMap(1);
final String cred = login + ":" + pwd;
final String auth = "Basic " + Base64.encodeBytes(cred.getBytes("UTF-8"));
params.put("Authorization", auth);
setVideoURIMethod.invoke(videoView, uri, params);
Of course since this is undocumented API it is not guaranteed to work properly, you should handle exceptions and have a fallback plan.