BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 07-19-2007, 11:24 AM   #1 (permalink)
New Member
 
Join Date: Mar 2007
Model: 7190
Carrier: nothing
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default download images whit BB application

Please Login to Remove!

hi

i need download a picture using a BB aplication from a web server, after process that images to i can show in the same application..

does can do this idea?

tanks.
Offline  
Old 07-24-2007, 02:37 AM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Skipper_Joe's Avatar
 
Join Date: Jan 2007
Location: Kharkov, Ukraine
Model: 8300
Carrier: N/A
Posts: 237
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is doable, of course.
You can download image over http, store it as array of bytes, create EncodedImage from array of bytes and render it on the screen using corresponding methods of Graphics class.
Offline  
Old 07-24-2007, 09:42 PM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2007
Model: 8800
PIN: N/A
Carrier: GPRS
Posts: 68
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

The main process like this, and you can complete it :
xxx8230;xxx8230;
connect = (HttpConnection)Connector.open(url);
int len = (int)connect.getLength();
imageData = new byte[ len ];
is = connect.openInputStream();
int total = 0;
count = 0;
while ( ( len != total) && (count != -1))
{
count = is.read(imageData, total, len - total);
total += count;
}
is.close();
connect.close();

image = EncodedImage.createEncodedImage(imageData, 0, imageData.length );
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

576 X STM M95020-WMN6TP EEPROM Serial-SPI 2K-bit 256 x 8 3.3V/5V 8-Pin SO N T/R
$54.0
576 X STM M95020-WMN6TP EEPROM Serial-SPI 2K-bit 256 x 8 3.3V/5V 8-Pin SO N T/R picture1254 X ONSEMI CAT24C128WI-GT3 IC EEPROM 128KBIT 400KHZ 8SOIC
$59.0
1254 X ONSEMI CAT24C128WI-GT3 IC EEPROM 128KBIT 400KHZ 8SOIC picture3000pcs New Atmel 2 Wire Serial EEPROM AT24C01A-SU18
$249.99
3000pcs New Atmel 2 Wire Serial EEPROM AT24C01A-SU18  pictureATMEL EEPROM - AT93C46B-10PI-2.7 - New Factory Package - Lot of 2,500
$100.0
ATMEL EEPROM - AT93C46B-10PI-2.7 - New Factory Package - Lot of 2,500 pictureSerial EEPROM 1024Kb (in 8 bit) 400Khz 24AA1025 24AA1025-I/P DIP8 x2 USA genui
$9.9
Serial EEPROM 1024Kb (in 8 bit) 400Khz 24AA1025 24AA1025-I/P DIP8  x2  USA genui picture






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