android - Check if audio file exists on server -



android - Check if audio file exists on server -

how can check if sound file exists on server?

i want check if file exists on server , play it, otherwise want exit onclick event.

something do:

url url = new url("http://youraudiourl"); httpurlconnection huc = (httpurlconnection) url.openconnection(); int responsecode = huc.getresponsecode(); if( responsecode == 200){ // sound file exists }

android file audio

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -