Ulf Dittmer wrote:You're initializing the "urls" array to be of zero length - so when you try to access the element at the first position ("urls") you get the exception. Try "String urls = new String;" instead.
Ron McLeod wrote:Adding the ACCESS_NETWORK_STATE permission should have fixed that issue.
Maybe try making a clean build.
aniket chaudhary wrote:this is happening because you are not running network retated stuff in a new thread...android does not allow the network operations in main thread...it will work if you start a new thread for network connections