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

APPRX 1000PC 1N5236 , 7.5VOLT .5W ZENER DIODE LOT - DO35
$4.99
APPRX 1000PC 1N5236 , 7.5VOLT .5W ZENER DIODE LOT - DO35 picture5-PCS SI HIGH VOLTAGE RECTIFIER SWITCH 2-PIN DO-41 NTE NTE525 525 NTE525 525
$10.7
5-PCS SI HIGH VOLTAGE RECTIFIER SWITCH 2-PIN DO-41 NTE NTE525 525 NTE525 525 picture5-PCS SI GENERAL PURPOSE RECTIFIER FAST SWITCHING 2-PIN DO-41 NTE N NTE558 558
$7.73
5-PCS SI GENERAL PURPOSE RECTIFIER FAST SWITCHING 2-PIN DO-41 NTE N NTE558 558 picture3-PCS SILICON PIN DIODE NTE NTE555 NTE555
$7.28
3-PCS SILICON PIN DIODE NTE NTE555 NTE555 picture10-PCS TRANSISTOR ARRAY 7-UNIT 150MA WITH CLAMP DIODE AND STROBE; NTE2070 2070
$33.69
10-PCS TRANSISTOR ARRAY 7-UNIT 150MA WITH CLAMP DIODE AND STROBE; NTE2070 2070 picture






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