04-12-2012 07:44 PM
Icocea,
Thanks for posting this. I tried the code but in my case it did not work, is there anything else that needs to be added? Maybe on the configxml file?
Also, I am not familiart with the code "blackberry.transport.RemoteFunctionCall("blackber
Regards,
Rosendo
04-12-2012 08:11 PM - edited 04-12-2012 08:17 PM
Yes, you need to enable the blackberry.invoke feature in the config file for this to work. Check out the discussion in the github link posted by astanley.
04-12-2012 10:06 PM
Great this works! Many thanks!
04-19-2012 09:33 AM
I still did not get this to work in the simulator. Must I configure an e-mail account before I can use this feature or will it just not work in the simulator?
Cheers,
Sven
04-20-2012 06:57 PM - edited 04-20-2012 07:04 PM
There is no native email client currently available in the simulator.
04-20-2012 07:10 PM
I tested this using an actual playbook device. The emulator runs to slow in my PC that is why I did not test it there.
04-22-2012 02:43 PM
05-07-2012 09:49 PM
Thank you for this. There are some limitations to this solution. Because we are sending the subject and body of the email in the argument, we can only send so many characters. urlencoding the sting shortens this considerably too (consider each space will take up 3 characters when encoded to '%20') From my testing... I ran into 2 limits:
Limit 1. Beyond about 1135 chars. the app is unable to launch the Messages app. The app will bounce in and out of focus and will cause an error 7. This can be overcome if the user already has the Messages app running. Until we hit limit 2.
Limit 2. Beyond about 1995 chars. the app just won't be able to pass the message at all. I believe the error was error 35.
The above character counts are approximate. I hope this info helps others. This is still the best solution I have seen. yet.
05-08-2012 10:33 AM - edited 05-08-2012 10:52 AM
@icq782443 -- Thanks for the great info. This has also recently been discussed to some extent on github (see link in a previous post) but we were unaware of Limit 2. Cheers!
05-30-2012 02:01 AM
I must be missing something, I've tried to get this to work and I just can't seem to get it.
Can I not call this with onClick?
I've been trying
<script>
function launchMail() {
var remote = new blackberry.transport.RemoteFunctionCall("blackberr
remote.addParam("appType", "mailto:?Subject=SubjectStr&body=" + encodeURIComponent(BodyStr));
}
</script>
<button onclick="launchMail();"/>
and a multitude of variations on that with no luck.
Also been trying it for an App World link using a line from the github error discussion:
<script>
function getApp() {
var remote = net.flash.navigateToURL.navigateToURL(
new URLRequest("appworld://" + encodeURIComponent(BodyStr)));
}
</script>
<img src="appworld.png" onclick="getApp()"/>
And it just hasn't been working.
Maybe some kind person could help me out?