I want to access an image stored in Blackberry, for example, in the folder "store / home / user / image.png".
Now I can 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 need to access it,
String filePath = "file:///store/home/user/image.png;
FileConnection fconn = (FileConnection)Connector.open(filePath, Connector.READ);
if (fconn.exists())
{
........
........
input.close();
fconn.close();
}
I can access the image using the second method, but I want to know if I can access the image using "Bitmap.getBitmapResource (filePath)"?
source
share