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

Adobe AIR Development

Reply
Contributor
Posts: 36
Registered: ‎07-06-2010
My Device: Blackberry Playbook tablet
My Carrier: MTS
Accepted Solution

E-mails from native client on Playbook

Hi community,

 

In light of the latest OS2.0 update, I would like to raise the painful question about Playbook native e-mail client capabilities. Is there a way to integrate sharing through e-mail from AIR application? Is there some API?

 

Ported Android application with sharing via e-mail works perfectlySmiley Happy

And I realy want to add this functionality to air playbook app.

 

Thank you.

Highlighted
Developer
Posts: 323
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900
My Carrier: Telus

Re: E-mails from native client on Playbook

I haven't tested this, but as a potential workaround (should there not be a native/AIR way to do this)... an HTML mailto: link works to launch the Messages app... so you might be able to use navigateToURL to go to:  "mailto:someone@example.com?subject=Woah!&body=Everybody was Kung Fu fighting!"


PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Contributor
Posts: 36
Registered: ‎07-06-2010
My Device: Blackberry Playbook tablet
My Carrier: MTS

Re: E-mails from native client on Playbook

Its working!!!Smiley Happy

 

Thank you very much!!!

 

Only one row of code: 

 

navigateToURL(new URLRequest("mailto:someone@example.com?subject=Woah!&body=Everybody was Kung Fu fighting!"));

 

It opens native e-mail client window like I need.

 

Thanks again.

Developer
Posts: 1,008
Registered: ‎12-12-2010
My Device: Passport (Red Limited Edition)
My Carrier: Mobile Vikings

Re: E-mails from native client on Playbook

I am trying to send a rather large text (logfile), but it seems like I am reaching the limit of the length of an URL. Any chance I could attach the logfile?

-------------------------------------------
BlackBerry Certified Builder for Native Application Development -- Proud member of the Belgian BlackBerry Developer group
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Regular Contributor
Posts: 57
Registered: ‎01-12-2012
My Device: Playbook
My Carrier: 3

Re: E-mails from native client on Playbook

Recall that you could with certain mailclients could get away with this

mailto:name@domain.com?Subject=SubjTxt&Body=Bod_Txt&Attachment=""file.txt""

Maybe it will work w Messenger as well??
Developer
Posts: 1,008
Registered: ‎12-12-2010
My Device: Passport (Red Limited Edition)
My Carrier: Mobile Vikings

Re: E-mails from native client on Playbook

Just tried that, no dice unfortunately...

-------------------------------------------
BlackBerry Certified Builder for Native Application Development -- Proud member of the Belgian BlackBerry Developer group
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: E-mails from native client on Playbook

"attachment" is not an official standard, but many clients support it. Try giving the full native file path to the file, just to make certain it is not supported.
Developer
Posts: 1,008
Registered: ‎12-12-2010
My Device: Passport (Red Limited Edition)
My Carrier: Mobile Vikings

Re: E-mails from native client on Playbook

Thank you for the suggestion jtegen, but it does not work either unfortunately. What is the maximum length of an URLRequest?

-------------------------------------------
BlackBerry Certified Builder for Native Application Development -- Proud member of the Belgian BlackBerry Developer group
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: E-mails from native client on Playbook

Not certain. From what I could find, it varied from 256 to 2048, so it might be implementation specific. Maybe try a POST request, but it is uncertain how the device is intercepting this information and the email client would check POST as well as GET information.