I want to access an image stored in Blackberry, say at location "store/home/user/image.png" .
Now can i access this image as,
String filePath = "file:///store/home/user/image.png;
Bitmap image = Bitmap.getBitmapResource(filePath);
BitmapField bitmapField = new BitmapField(image, BitmapField.FOCUSABLE);
OR
I have to access it as,
String filePath = "file:///store/home/user/image.png;
FileConnection fconn = (FileConnection)Connector.open(filePath, Connector.READ);
if (fconn.exists())
{
........
........
input.close();
fconn.close();
}
I am able to access the image using the second way but I want to know that can I access it using "Bitmap.getBitmapResource(filePath)" ?