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

Web and WebWorks Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 30
Registered: ‎12-18-2012
My Device: BB Z10, BBQ10 Dev Alpha C
My Carrier: xyz
Accepted Solution

Q10 Invocation Framework: Invoking Email

I've used the code snippets below for Z10 app to invoke email app but unfortunately they don't work for Q10.

 

Any idea?


 

blackberry.invoke.card.invokeEmailComposer({
subject: "",
body: "",
to: ""
}, function() {
blackberry.ui.toast.show('Success');
}, function() {
blackberry.ui.toast.show('Error');
});

 

 

blackberry.invoke.invoke({
target: "sys.pim.uib.email.hybridcomposer",
action: "bb.action.SHARE",
type: "text/plain",
data:""
}, function() {
blackberry.ui.toast.show('Success');
}, function() {
blackberry.ui.toast.show('Error');
});


 

-------------------------
@oggyindahouse
Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Q10 Invocation Framework: Invoking Email

Are you getting an error?  Try modifying your code to capture the error message and confirm what you are seeing.

 

is this from the simulator - if so you may be seeing a "target not found" error which means the email composer card simply isn't included in the OS build.

 

blackberry.invoke.card.invokeEmailComposer({
subject: "",
body: "",
to: ""
}, function() {
blackberry.ui.toast.show('Success');
}, function(err) {
blackberry.ui.toast.show('Error' + err);
});

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Contributor
Posts: 30
Registered: ‎12-18-2012
My Device: BB Z10, BBQ10 Dev Alpha C
My Carrier: xyz

Re: Q10 Invocation Framework: Invoking Email

[ Edited ]

Hi,

I'm using Dev Alpha C device for testing and I am getting the following error:

 

INVOKE_NO_TARGET_ERROR

 

Possibly  It hasn't been included yet in OS.

-------------------------
@oggyindahouse
Retired
Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: Q10 Invocation Framework: Invoking Email

If you don't have a hub on your dev alpha C that is the message you will get. It means your invoke query is well formed, but there is no target available to be invoked.

 

The target: "sys.pim.uib.email.hybridcomposer" should be fine, you will need to wait for it to be released to the device.

 

 

@erikjohnzon
erjohnson@blackberry.com
Contributor
Posts: 30
Registered: ‎12-18-2012
My Device: BB Z10, BBQ10 Dev Alpha C
My Carrier: xyz

Re: Q10 Invocation Framework: Invoking Email

Exactly.

The same problem appears for invoking phone too. I have used the same invoking snippet that was ok on Z10.

Let's wait for next OS update.

 

-------------------------
@oggyindahouse
Highlighted
Contributor
Posts: 30
Registered: ‎12-18-2012
My Device: BB Z10, BBQ10 Dev Alpha C
My Carrier: xyz

Re: Q10 Invocation Framework: Invoking Email

The reason was that the required target apps hadn't been included. I have updated to newest os version and it works!

Link to update: http://developer.blackberry.com/blackberry10devalpha/devalpha_update.html

-------------------------
@oggyindahouse