04-21-2013 01:29 PM
I'm using navigator_invoke() for a couple of things (e.g. opening the browser "http://" or calling numbers "tel:"), because using the Cascades invocation framework is not an option for me. The invocation framework only works if the app is currenty running in the foreground and therefore not applicable for my project where the UI is not required at all (all actions are triggered by incoming push messages).
So, here's my problem: I cannot use the "mailto:" scheme, altough it is supposed to work according to the documentation.
Triggering for example:
Returns the following error:
04-24-2013 04:27 PM - edited 04-24-2013 04:52 PM
It is currently not permitted to invoke while in the background. Is this the issue or are you having issues with invoking while in the foreground as well?
04-24-2013 04:37 PM
I was already told (although I couldn't find it in the official docs) that invocation only works if the app is currently in the foreground - which would kill my (almost finished) app idea...
But luckily navigator_invoke() seems to ignore that limitation and therefore I make use of it.
My question is, why does navigator_invoke() not work with email addresses as the documentation states? The code sample I have pasted here does not work, independently of my app running in the foreground or not. Calling it with any http:// URL does open the browser.
04-24-2013 04:46 PM
04-27-2013 02:32 AM
This is sad, but seemingly there's nothing developers can do about it...
So I modified my codebase in order to invoke my actions via Hub notifications - which also works for invoking my own app, the phone and the browser.
However, it behaves weird when trying to invoke the email hybridcomposer - again!
It works when called directly from my (foreground running) app:
InvokeManager invokeManager; InvokeRequest invokeRequest; invokeRequest.setTarget("sys.pim.uib.email.hybridc
omposer"); invokeRequest.setAction("bb.action.COMPOSE"); invokeRequest.setMimeType("message/rfc822"); invokeRequest.setUri("mailto:email@example.com") ; invokeManager.invoke(invokeRequest);
It does not work when invoked via the HUB (although I couldn't find out how to debug it to get further details):
Notification *notification = new Notification(NOTIFICATION_PREFIX + QString::number(push.seqNum()),this); InvokeRequest invokeRequest; invokeRequest.setTarget("sys.pim.uib.email.hybridc
omposer"); invokeRequest.setAction("bb.action.COMPOSE"); invokeRequest.setMimeType("message/rfc822"); invokeRequest.setUri("mailto:firstname.lastname@example.org") ; notification->setTitle("Just Testing..."); notification->setInvokeRequest(invokeRequest); notification->notify();
So: Who messed up the invocation framework?
No, but seriously: what can I do about it?