-
Notifications
You must be signed in to change notification settings - Fork 14
Cannot launch mail client using mailto: in Tablet OS 2.0 #53
Comments
Is this widely used in WebWorks apps? |
Yeah I think so - I'll try to add facts here to this thread. Should have added a link! Discussion about this in the forums: Have also received a request via BBM from Kathryn (Larhs). I'm seeing more and more interest in this, especially now that Tablet OS 2.0 has launched and there is a native email client. |
What was the behavior on 1.0? Launch bridge mail if it exists?Ken Wallis Research In Motion -----Original Message-----
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful. |
I suspect the same - did not launch the mail client. Honestly can't remember! -----Original Message----- What was the behavior on 1.0? Launch bridge mail if it exists?Ken Wallis Research In Motion -----Original Message-----
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful. Reply to this email directly or view it on GitHub: This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful. |
As an ISV dev I vote for this issue. Actually I would vote for any PIM integration in webwork on tablet ASAP. |
This is definitely needed by me! |
astanley are there PIM APIs for other development platforms? IE Native or Flash? |
No there is currently not. Its on the product management roadmap for future platforms. However this capability cannot currently be achieved through a WebWorks extension. |
Is there a JIRA issue I can go vote for ;) |
It is surprising that the "mailto" feature is still missing in WebWorks for PlayBook OS 2.0. The sooner this bug is fixed, the better. It would be great if it allowed the WebWorks app to programmatically attach a document to an email message and send it using the native email app. |
Same problem here: mailto: works in browser, but not in the packaged webworks app (instead of launching native email application a javascript alert is displayed, with the contents of the mailto:, plus "is not allowed" at the end. I tried specifying in the config.xml file, to no avail. Please advise. |
After some API digging I figured out a simple way to send an email from a WebWorks app using the native email client. But then I wonder why there is no response from the dev team on this issue. |
Would you share with the posterity please? |
Well, in case I am missing something then maybe someone can improve this code. Here goes: var remote = new blackberry.transport.RemoteFunctionCall("blackberry/invoke/invoke"); mailto: can be followed by an email address. String SubjectStr must not contain space characters, use %20 instead. Or use encodeURIComponent() like I did for BodyStr. |
Interesting. Looking at the code I understand why this works, though I am surprised that its not an understood thing if it does work that way. This implies that net.flash.navigateToURL.navigateToURL(
new URLRequest("mailto:?Subject=SubjectStr&body=" + encodeURIComponent(BodyStr))); will work the way described as well, which means there is a hidden backdoor AS api as well. GOOD find! |
Thanks. |
After thinking about this a bit this means that there must be some addressing inside Air to other applications which is not well documented. I am curious why this didn't seem to work for me from my JSConsole App when I tried blackberry.invoke.invoke('mailto:[email protected]') |
Just popping in... I don't really use WebWorks, but are you saying that it doesn't support the standard PIM APIs, including the messages:// URI scheme? Note that the PIM API doesn't currently allow file attachments, though. See JIRA issue TABLET-550 for the bug regarding that. :/ https://www.blackberry.com/jira/browse/TABLET-550 |
lewellyn rock on. It seems Adam is totally wrong, which is good because these features rock. Now time to work on some JS magic so the handheld APIs work. |
@lewellyn I know you said you don't use WebWorks, but do you happen to know how would I call navigator_invoke() from an htm page (WebWorks application)? Anyone? |
@sdragomir I believe that what we saw @lcocea showing off means that the blackberry/invoke/invoke api hook which calls net.flash.navigateToURL.navigateToURL seems to be implemented in AIR by calling navigator_invoke(). Hence anything you pass into the invoke API winds up resolving to the linked API page. |
@muerl that's great, but I could not find anywhere information about how to actually call that from htm. Assuming the code @lcocea shared is javascript, what is 'blackberry' in the context of the following line: Is that defined in a javascript library that has to be specified as a feature in my application's config.xml? What feature? |
You need to add blackberry.invoke to your config.xml. <feature id="blackberry.invoke"/> |
That worked! Thank you! |
Thank you @lcocea ! Very helpful. I'm wondering where was blackberry.transport.RemoteFunctionCall documented?? I can't find anything on that or how it works |
So I am on mobile so I can't link but what he is invoking is the rest api. I know there wad documentation around 2.0. Its a specialized version of blackberry.invoke I think you can directly invoke it that way, by pretending its a "Browser Url" and "invoking" it. I am hoping we can push out some extensions at jam next week, to make this more clear. If you are there look me up ;) Thank you @lcocea ! Very helpful. I'm wondering where was blackberry.transport.RemoteFunctionCall documented?? I can't find anything on that or how it works Reply to this email directly or view it on GitHub: Sent From Device. |
There seems to be a message length limit of 1000 (or so) bytes? I'm getting an error 7 on the PlayBook and I was able to determine it has to do with the message length... If that's the case, is it like that by design? Can the limit be increased? |
Did you try to catch the exception and see what the message reads? |
@lcocea I don't know how to read the error from the RemoteFunctionCall... I cannot find the documentation for it. Could you please share if you know how that's done? Thanks! |
You could try this: try It probably won't work for the async call part but it may be informative if the exception occurs before that statement. |
The best bet is it to attach a Flash Debugger to it and see what gets Its likely flash will show SOMETHING in the log, and if not you can On Mon, Apr 30, 2012 at 3:06 PM, Laurent Cocea
|
The exception seems to be raised at the last statement, remote.makeAsyncCall(). I am just speculating, I am off "my reservation" here, so I could be wrong -- I think the argument string for function makeAsyncCall() is too long if length(SubjectStr + BodyStr) is greater than ~1K. Statement alert(e.message) also doesn't run: my PlayBook says "Can't start Messages due to an Error 7". Error 7 description on Unix is something like "arg(s) list too long". We need the API to support email attachments for larger email messages. |
Thank you for the info. I'll shorten the email message for now and will change it back once the API will have support for attachments. By the way, I still cannot find the documentation for RemoteFunctionCall... I don't know what I would have done without the help from this forum. The online documentation is inadequate, when it's not missing completely, to say the least. |
I agree. But this is common for open source projects. This is one reason why I plan to do most of my BB software development in NDK/Cascades after I publish my next WebWorks app. |
Is this issue fixed with PlayBook 2.1.0.560? Thanks. |
Hi I want to send an email with attachment in Playbook using webworks(my existing app is in webworks) The workaround suggested are with character length limitations and also doesnt support attachments. This thread in github and the thread have been going for more than 2 years, please give a solution, any method is fine, it should be supported by webworks in Playbook thats all. Please help Thanks |
SOLVED :D but other problems :( There is a workaround to invoking mail attachment in playbook, Use phonegaps webintent.js plugin and webintent.java And create an apk by building with android sdk finally convert the apk to bar using hatax apk2bar now run the bar in playbook and voila, it invokes mail client with attachment :) I checked on playbook OS 2 But there are still issues with permissions on ajax calls, I am gettin Network error on ajax call for POST on playbook, whilst the ajax is workin fine in android I have posted the issue here http://supportforums.blackberry.com/t5/Android-Runtime-Development/XMLHttpRequest-Exception-101-APK-to-BAR-file-Conversion/td-p/2166063 pls help Thanks Regards |
Hi is there a way to get the source code of hatax apk2bar. I tried googling but couldnt find the source code, there is only apk2bar.jar, Is there anyway to contact the developer of apk2bar.jar? If I can get hold of the API they are using to invoke the mail client with attachment, then i could probably use it directly in my webworks and generate a bar instead of building an apk and converting to bar. pls help Regards |
The browser supports the mailto: scheme, but WebWorks applications running on Tablet OS 2.0 do not.
The text was updated successfully, but these errors were encountered: