//======== Delete Specific File From SDCARD ======================
private void deleteFile() {
File list = new File(Environment.getExternalStorageDirectory() + "/Directory Name/");
File[] vidlist = list.listFiles(new FilenameFilter() {
public boolean accept(File dir, String filename) {
return ((filename.endsWith(".temp")));
}
});
for (int i = 0; i < vidlist.length; i++) {
vidlist[i].delete();
}
}
Android is an operating system for mobile devices such as cellular phones, tablet computers and netbooks. Android is developed by Google and is based upon the Linux kernel and GNU software. It was initially developed by Android Inc
Wednesday, June 30, 2010
Get Device ID in Android
//======== Get Device ID ======================
public void getDeviceID() {
TelephonyManager TelephonyMgr = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
DEVICE_ID = TelephonyMgr.getDeviceId();
}
Subscribe to:
Posts (Atom)