04-09-2013 04:21 PM - edited 04-10-2013 02:58 PM
I have been trying to get this to work for a little over a day now. I am trying to use the "navigator_invoke" from bps to make a mailto call like so:
char* result = 0;
st << "mailto::email@example.com";
int error = navigator_invoke(st.str().c_str(), &result);
When I run this on the Z10 or Devalpha it returns an error with result="notfound". If I run the same code on the Playbook it works fine. Can anyone give me an idea on where to find a solution?
I am working in c++ and do not use Cascades or WebWorks.
Solved! Go to Solution.
04-10-2013 02:54 PM
Can you test it again with only one ":"
On some dev alpha's (without Hub) i'd expect it to fail...
04-10-2013 03:24 PM
I suspect the documentation is out of date; try using the invocation frame work like this;
04-10-2013 03:38 PM
The targets from that previous link will apply to using the C api too;
04-11-2013 02:30 PM
I have tried what was on the page, as best as I could, but no difference.
I have also tried opening other things with the navigator_invoke.
04-11-2013 03:55 PM
I should also mention, I have also opened the browser and manually types in "mailto://" in the address bar, and that does open the email composer.
Not sure if that helps.
04-11-2013 05:17 PM
Here's code that works for me; (this is bad code... no return value checking...)
navigator_invoke_invocation_t * invocation = NULL; navigator_invoke_invocation_create(&invocation); navigator_invoke_invocation_set_uri(invocation, "mailto:firstname.lastname@example.org"); navigator_invoke_invocation_send(invocation); navigator_invoke_invocation_destroy(invocation);
Is this similar to what you tried?
04-11-2013 05:28 PM
No, but when I tried I could not #include <bps/navigator_invoke.h>. It says "No such file or directory". I suspect that is something outside the Native only scope I am using so far.