If you have a music widget player email liteupmobile@gmail.com with your information to be selected as the artist of the week on our blog.
Artist Benny James
try {
URL input = new URL("WHAT_URL_YOU_USE_TO_DOWNLOAD_FILE");
URLConnection conn = input.openConnection();
int contentLength = conn.getContentLength();DataInputStream stream = new DataInputStream(input.openStream());byte[] buffer = new byte[contentLength];
stream.readFully(buffer);
stream.close();DataOutputStream output = new DataOutputStream(new FileOutputStream(Environment.getExternalStorageDirectory() + "/WHATEVER_FILE"));
output.write(buffer);
output.flush();
output.close();
} catch(FileNotFoundException e) {
return;
} catch (IOException e) {
return;
}
<uses-permission android:name=”android.permission.INTERNET”></uses-permission>
<uses-permission android:name=”android.permission.WRITE_EXTERNAL_STORAGE”></uses-permission>
boolean exists1 = (new File(Environment.getExternalStorageDirectory() + “/example/1″)).exists();if (exists1) {}
File a = new File(Environment.getExternalStorageDirectory() + “/example1/example2″);a.mkdir();//this will create example2 onlya.mkdirs();//this will create example1 and example2a.delete();//this will delete example2 weather it is a file or a folder