Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
abhi007tyagi
Posts: 215
Registered: ‎09-29-2010
My Carrier: Airtel

attach file in email client

Hi,

 

Is it possible to attach a file programatically to default email client of blackberry smartphone?
I don't want to create a whole new client, just open default client and programatically attach file from system.

After email is send control should return to my application.

 

Thanks

Abhinav Tyagi

Blackberry Z10-Limited Edition
Blackberry Playbook (won in free playbook offer)
My Apps : pAinT, HealthMeter, Shoot
Please use plain text.
Administrator
MSohm
Posts: 12,957
Registered: ‎07-09-2008
My Carrier: Bell

Re: attach file in email client

Yes, this is possible.  The code below shows how to send an email message with an attachment.

 

Create an attachment

 

You can also invoke the Messages application with a draft message with attachment that the user can send.  Use the code above to create the message but instead of using Transport.send to send it, use the Invoke class to invoke the Messages application using your newly created message as an argument.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Developer
abhi007tyagi
Posts: 215
Registered: ‎09-29-2010
My Carrier: Airtel

Re: attach file in email client

Mark,

 

For this I think I need to create a new screen to ask user to add recepient address (manually) and subject and other stuff..

 

Can I get, default email app open on click of button and user just need to select recepient name from contact list and send email ?

 

Thanks

Abhinav Tyagi

Blackberry Z10-Limited Edition
Blackberry Playbook (won in free playbook offer)
My Apps : pAinT, HealthMeter, Shoot
Please use plain text.
Developer
peter_strange
Posts: 17,701
Registered: ‎07-14-2008

Re: attach file in email client

Please use plain text.