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

Reply
Contributor
oguzhancansever
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
Please use plain text.
Administrator
astanley
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.
Please use plain text.
Contributor
oguzhancansever
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
Please use plain text.
BlackBerry Development Advisor (Retired)
erikjohnzon
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
Please use plain text.
Contributor
oguzhancansever
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
Please use plain text.
Contributor
oguzhancansever
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
Please use plain text.