BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 09-22-2009, 01:57 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2009
Model: 9530
PIN: N/A
Carrier: soft
Posts: 26
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Attaching file for E-mail

Please Login to Remove!

Hi All,

I need to attach a file to send a mail. i am not finding how to open the file browser form the composer...

Please let me is there any way...

Thanks in advance..

Soma
Offline  
Old 09-22-2009, 03:47 PM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2007
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 18
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

The code I posted to your previous thread already does attachments.

sending mail from BB simulator

Last edited by Kevin Boyd : 09-22-2009 at 03:51 PM.
Offline  
Old 09-23-2009, 12:17 AM   #3 (permalink)
New Member
 
Join Date: Sep 2009
Model: 9500
PIN: N/A
Carrier: T-mobile
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Kevin code is working

Last edited by Raja86 : 09-23-2009 at 12:31 AM.
Offline  
Old 09-23-2009, 12:39 AM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2009
Model: 9530
PIN: N/A
Carrier: soft
Posts: 26
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Kevin that code is working fine i was giving the full path for the file name..

i want to select a file using a file browser.. like we do in normal file attachments...

so please help me in this case..

to open a file browser and get the selected file path....


thanks in advance
Offline  
Old 09-23-2009, 04:09 PM   #5 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2007
Model: 8100
PIN: N/A
Carrier: Vodafone
Posts: 18
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think you will have to write your own class to do the file browsing. Here is some code to get you started.

Code:
// return comma seperated list of folders or files
public String ListFoldersOrFiles(String srcdir, boolean getFolders)
{
	String names = "";
	try 
	{
		FileConnection fconn = (FileConnection)Connector.open(srcdir);
		Enumeration currentRootEnum = fconn.list("*", true);
		while (currentRootEnum.hasMoreElements()) 
		{
			String name = currentRootEnum.nextElement().toString();
			fconn = (FileConnection)Connector.open(srcdir + name);
			if (getFolders && fconn.isDirectory())
				names += name + ",";
			else if (! getFolders && ! fconn.isDirectory())
				names += name + ",";
		}
		fconn.close();
		return names;
	} 
	catch (IOException ioe) 
	{
		return names;
	}
}
There is also a fileexplorerdemo in the JDE sample code.

Last edited by Kevin Boyd : 09-23-2009 at 04:15 PM.
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

TYAN S7018GM3NR S7018GM3NR-B Intel Dual Xeon 5500 LGA1333/ (6+6) DIMMs/ (3) GbE
$479.0
TYAN S7018GM3NR S7018GM3NR-B Intel Dual Xeon 5500 LGA1333/ (6+6) DIMMs/ (3) GbE pictureGEORGE W GALES DCR-5MX XEON MERCURY POWER SUPPLY
$49.99
GEORGE W GALES DCR-5MX XEON MERCURY POWER SUPPLY pictureLifeSize Video Center 2200 2x Xeon E5520 4-Core 2.27GHz/6GB DDR3/2TB HDD Server
$155.99
LifeSize Video Center 2200 2x Xeon E5520 4-Core 2.27GHz/6GB DDR3/2TB HDD Server pictureHp Proliant DL380 G7: 2x Intel Xeon E5640 QC @ 2.67GHz 48GB DDr3 P410i 2xPSU~
$280.44
Hp Proliant DL380 G7: 2x Intel Xeon E5640 QC @ 2.67GHz 48GB DDr3 P410i 2xPSU~ pictureSiemens Recon III 10746488 MRI x2 Xeon E5620 2.4GHz CPU 48GB RAM x4 279.3 SCSI
$2399.99
Siemens Recon III 10746488 MRI x2 Xeon E5620 2.4GHz CPU 48GB RAM x4 279.3 SCSI picture






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