Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
Posts: 6
Registered: ‎03-31-2014
My Device: 9900
My Carrier: Blackberry

Re: SD card in SQLite

Hi peter,

 

the SQLite demo is responding "system/" not "sdcard/" when I am using simulator and passed database folder path of my computer.

 

boolean sdCardPresent = false;
String root = null;
Enumeration e = FileSystemRegistry.listRoots();

while (e.hasMoreElements())
{
System.out.println("e.nextElement() = "+e.nextElement());  /// here i printed the root name. its system/ not sdcard/
root = (String)e.nextElement();
if(root.equalsIgnoreCase("sdcard/"))
{
sdCardPresent = true;
}
}
if(!sdCardPresent)
{
UiApplication.getUiApplication().invokeLater(new Runnable()
{
public void run()
{
Dialog.alert("This application requires an SD card to be present. Exiting application...");
System.exit(0);
}
});
}
else
{

Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: SD card in SQLite

And have you actually added an SD Card as I suggested?