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

Native Development

Reply
Developer
sporadicsoftware
Posts: 72
Registered: ‎09-30-2011
My Device: Bold 9930 & PlayBook
My Carrier: Sprint
Accepted Solution

navigator_invoke & mailto

I had successfully used this code to open an email with PB OS 2.0.x:

 

bps_initialize();
char *pError;
navigator_invoke(email.toUtf8(), &pError);
bps_shutdown();

However, my PB is now running the 2.1 Beta and this no longer works. Has anyone else seen this? I do not currently have the simulator installed to test to ensure this still works with 2.0.x (does the simulator even have the mail app?).

 

Thanks

Nic 

Please use plain text.
BlackBerry Development Advisor (Retired)
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha
My Carrier: N/A

Re: navigator_invoke & mailto

Hi there,

 

Can you check which code/error is returned from navigator_invoke()?

 

Martin

Please use plain text.
Developer
sporadicsoftware
Posts: 72
Registered: ‎09-30-2011
My Device: Bold 9930 & PlayBook
My Carrier: Sprint

Re: navigator_invoke & mailto

[ Edited ]

My apologies, I missed an important detail: The mailto does cause a new message to open. However, the To and Subject fields are blank. I am not getting an error returned. I am using something like this:

 

mailto:me@me.com?Subject=App%20Feedback

 

Thanks

Nic

Please use plain text.
BlackBerry Development Advisor (Retired)
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha
My Carrier: N/A

Re: navigator_invoke & mailto

[ Edited ]

Can you provide an exact string you are sending to navigator_invoke? (hiding the exact email of course :smileytongue:)

"messages:// ..."

 

Please use plain text.
Developer
sporadicsoftware
Posts: 72
Registered: ‎09-30-2011
My Device: Bold 9930 & PlayBook
My Carrier: Sprint

Re: navigator_invoke & mailto

No messages:// stuff. Just the mailto line.

 

 

Nic

Please use plain text.
BlackBerry Development Advisor (Retired)
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha
My Carrier: N/A

Re: navigator_invoke & mailto

Have you tried specifying the 'to' option explicitly and matching the capitalization of 'subject' as so:

 

QString message("mailto:?to=me@me.com&subject=test subject");

 

Martin

 

Please use plain text.
Developer
sporadicsoftware
Posts: 72
Registered: ‎09-30-2011
My Device: Bold 9930 & PlayBook
My Carrier: Sprint

Re: navigator_invoke & mailto

Fixed with troubleshooting 101: rebooted PlayBook!

 

Thanks

Nic

Please use plain text.
BlackBerry Development Advisor (Retired)
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha
My Carrier: N/A

Re: navigator_invoke & mailto

Excellent!

 

Thanks for sharing; Let me know if you run into anything else.

 

Regards,

 

Martin

Please use plain text.