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

Native Development

Reply
Super Contributor
Meghasanghvi
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Target Id for BBM in Invocation framwork

Hi,

I want to create bound invoke Query using invocation framework. I want to know the Target Id for the BBM. I search in the documention of the invocation framwork but did not find target id for the BBM. 

 

And also in invoke query can we give multiple target id in one query?

 

Thanks,

Megha.

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Target Id for BBM in Invocation framwork

Assuming the target id is just the app's folder name, you can easily find some of those out by browsing the filesystem with Momentics, or using SSH and the command line.

I see the BBM app has the folder name sys.bbm.gYABgLOJBR2Vz7FzS.kdgJchuag on the DevAlpha with 10.0.9. Possibly all or some part of that is what you want.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Super Contributor
Meghasanghvi
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Re: Target Id for BBM in Invocation framwork

Hi peter,

 

I tried with invokeTargetId which you suggest but that also did not work and it will not display share option.

Code:

InvokeActionItem {
ActionBar.placement: ActionBarPlacement.OnBar
title: "Share"
query {
mimeType: "image/jpg"
// uri: "file:///accounts/1000/shared/camera/IMG_00000044.jpg";
uri: setURIString(photoPage.imageSource)
invokeTargetId: "sys.bbm.gYABgLOJBR2Vz7FzS.kdgJchuag"
}
}

 

 

Please use plain text.
Developer
tommy20
Posts: 248
Registered: ‎05-18-2011
My Device: Curve 9300, BB10 Dev Alpha C, Z10

Re: Target Id for BBM in Invocation framwork

Even this folder "sys.bbm.gYABgLOJBR2Vz7FzS.kdgJchuag" works for you this case/this time, by looking at this name (like a random string) I don't think this folder name is the same for all devices and all future SDK versions.
--tom
Please use plain text.
Super Contributor
Meghasanghvi
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Re: Target Id for BBM in Invocation framwork

Hi,

In this case how can i know the folder name of each and every device? To resolve this issue i tried with following code  from the bound query documentation,

 

InvokeManager *iManager = new InvokeManager(this);
InvokeQueryTargetsRequest iQuery;
iQuery.setAction("bb.action.SHARE");
iQuery.setMimeType("image.png");
InvokeQueryTargetsReply *iQueryReply = iManager->queryTargets(iQuery);

QObject::connect(iQueryReply, SIGNAL(finished()), this,
SLOT(myQueryReplySlot()));

 

In document they said that this will return you number of applcation which support png images but how can i know how many are supported.

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Target Id for BBM in Invocation framwork


tommy20 wrote:
Even this folder "sys.bbm.gYABgLOJBR2Vz7FzS.kdgJchuag" works for you this case/this time, by looking at this name (like a random string) I don't think this folder name is the same for all devices and all future SDK versions.

Actually, although it looks random, it's not, and it should** remain the same in future.  As with all of our apps, which have similar ids, this string is both unique and permanent, and the design of App World and the OS relies on these things being true.  Without that, installing an update to your app would put it into a new folder, without access to the user's existing data for that app.

 

This is also the basis of the "bound" invocation approach, if I understood it correctly. (Not having done anything with IF yet, I may have misunderstood that point, but it doesn't change what I'm saying about the app id above.)

 

** I say "should" because of course I don't know that RIM will keep this particular name/id for the the BBM app once they launch, but whatever it is at launch, that's what it will stay.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Super Contributor
Meghasanghvi
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Re: Target Id for BBM in Invocation framwork

Hi Peter,

 

I tried with the target id which you given in your previous post but it result in the following error.

 

Below is the code and error message i received.

 

Error Message: InvocationWrapper::smileysurprised:nQueryFinished: no matching result from Menu Service for query


Query Code: 

InvokeActionItem {
ActionBar.placement: ActionBarPlacement.InOverflow
title: "Share"
query {
mimeType: "image/jpg"
uri: "file:///accounts/1000/shared/camera/IMG_00000044.jpg";
//uri: setURIString(photoPage.imageSource)
// invokeActionId: "bb.action.SHARE"
invokeTargetId: "sys.bbm.gYABgLOJBR2Vz7FzS.kdgJchuag"
}
}

Please use plain text.
Administrator
MSohm
Posts: 14,268
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Target Id for BBM in Invocation framework

Our next BlackBerry Native SDK release will include a full set of documentation for all the invocation parameters for all invokable RIM applications.

 

Stay tuned, this is coming.  

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.