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.

inside custom component

Java Development

Reply
Developer
abhi007tyagi
Posts: 225
Registered: ‎09-29-2010
My Device: Limited Edition Z10, Playbook
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: 14,379
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
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.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
abhi007tyagi
Posts: 225
Registered: ‎09-29-2010
My Device: Limited Edition Z10, Playbook
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: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: attach file in email client

Please use plain text.