06-12-2012 02:55 PM
Hi, How to detect if a device support built-in media storage or eMMC ??
07-01-2012 10:32 PM
08-08-2012 04:51 PM
08-08-2012 06:58 PM
SQLLite is supported on devices with OS 5.0 or better. You don't have to check it via checking of availability of SDCard.
08-09-2012 08:18 AM
08-09-2012 02:33 PM
08-09-2012 11:10 PM
There is actually an example right in the listRoots() api, but this is what you're looking for:
public boolean hasSD() {
Enumeration e = FileSystemRegistry.listRoots();
while (e.hasMoreElements()) {
String root = (String) e.nextElement();
if (root.equals("SDCard/"))
{ // the user has an SD card installed (we didn't check for free space though)
return true;
}
}
// we went through all the roots, and found no SD card, it's safe to assume there isn't one in the device
return false;
}
08-10-2012 02:17 AM
08-10-2012 03:53 AM
You can attach any location for database with use of DatabaseFactory.create. You can put there internal storage URL as location, path defaults to sdcard, but you can override it with your own path.