BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-27-2009, 06:25 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2009
Model: Strom
PIN: N/A
Carrier: Vodafone
Posts: 28
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question How to access image stored in Blackberry using Bitmap.getBitmapResource() ?

Please Login to Remove!

I want to access an image stored in Blackberry, say at location "store/home/user/image.png" .

Now can i access this image as,

Code:
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,

Code:
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)" ?
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

MAIN BOARD ALTAIR-60 R1.03G 08G11012113*SI ALTAIR 60 R103G Expedited shipping
$229.0
MAIN BOARD ALTAIR-60 R1.03G 08G11012113*SI ALTAIR 60 R103G Expedited shipping pictureMulti-Gas Detector MSA 10107602 ALTAIR 4X W/Charcoal Case LEL O2 CO H2S New
$450.0
Multi-Gas Detector MSA 10107602 ALTAIR 4X W/Charcoal Case LEL O2 CO H2S New  pictureMsa Altair 4x,5x Car Charger Dock Cradle
$25.0
Msa Altair 4x,5x Car Charger Dock Cradle  pictureReplacement Duo-Tox H2S/CO Sensor for MSA Altair 4/5 MSA P/N: 10089117
$179.0
Replacement Duo-Tox H2S/CO Sensor for MSA Altair 4/5 MSA P/N: 10089117 pictureReplacement Combustible LEL Sensor for MSA Altair 4/5 MSA P/N: 10089116
$159.0
Replacement Combustible LEL Sensor for MSA Altair 4/5 MSA P/N: 10089116 picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.