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

Adobe AIR Development

Reply
New Developer
cmax
Posts: 21
Registered: ‎04-19-2011
My Device: Blackberry Torch 9800
My Carrier: Rogers

Using the InvokeManager to query targets

[ Edited ]

I am having some trouble using the InvokeManager, more specifically InvokeManager.queryTargets(), to retrieve a list of invokable targets on the Dev Alpha.  Has anyone been successful doing this?

 

This is what I have so far and the resulting output:

 

private function queryTargets():void
{
var im:InvokeManager=InvokeManager.invokeManager;
var req:InvokeQueryTargetsRequest=new InvokeQueryTargetsRequest();
im.addEventListener(InvokeQueryTargetsEvent.SUCCESS, onSuccess);

req.targetType="ALL";
req.mimeType="image/jpg";
im.queryTargets(req);
}

protected function onSuccess(e:InvokeQueryTargetsEvent):void
{
trace(e.actions);
}

 

 

OUTPUTS:

 

[qnx.pps.Message(queryInvokeTargets dat: {
type : image/jpg
target_type : ALL
}, peer : null, error : null, id: null, result: null]
QUERY TARGETS RESPONSE [qnx.pps.Message(queryInvokeTargets dat: {
}, peer : @control, error : null, id: 1, result: queryInvokeTargets]
[InvokeQueryTargetsEvent type="queryTargetSuccess" actions=]

 

Please use plain text.
BlackBerry Development Advisor (Retired)
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: Using the InvokeManager to query targets

Hi,

 

Right now the current alpha release has functionality for it but nothing is connected. The next release will have this supported and should be out around Jam Americas.

 

Cheers,

Dustin

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
New Developer
cmax
Posts: 21
Registered: ‎04-19-2011
My Device: Blackberry Torch 9800
My Carrier: Rogers

Re: Using the InvokeManager to query targets

Correct me if i'm wrong, but it seems that with the release of the beta 3 SDK the queryTargets method and related have been removed.  How are targets identified on the device?

Please use plain text.
BlackBerry Development Advisor (Retired)
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: Using the InvokeManager to query targets

Hi, 

 

I haven't been able to look into this yet but in the release notes it says:

 

"Added targetType and targetKey properties to InvokeEvent" Just thought I would post something quick to get you going.  Dustin

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
New Developer
cmax
Posts: 21
Registered: ‎04-19-2011
My Device: Blackberry Torch 9800
My Carrier: Rogers

Re: Using the InvokeManager to query targets

[ Edited ]

Thanks for the reply Dustin.

 

I had previously checked the release notes and noticed the addition of the targetType and targetKey properties to the InvokeEvent Event Class. Based on the API reference, The InvokeEvent is dispatched when an application or viewer is invoked, which doesn't seem to have anything to do with querying invokable targets.

Also, the release notes do not mention anything about the following being depreciated:

InvokeQueryTargetsRequest Class
InvokeQueryTargetsEvent Event Class
queryTargets method from the InvokeManager

Those all seem to be missing now from the SDK and from any on the online documentation relating to the beta 3 SDK.

I look forward to hearing what you find out about this.

Please use plain text.
New Developer
cmax
Posts: 21
Registered: ‎04-19-2011
My Device: Blackberry Torch 9800
My Carrier: Rogers

Re: Using the InvokeManager to query targets

I'm guessing by the high number of views but lack of posts that no one has been able to figure out how to query invokable targets on the device.  My question now would be, does anyone know any of the invokable target IDs of the system apps?  The only ones I have been able to invoke so far are the following:

 

sys.browser

sys.pim.calendar

sys.appworld

 

If anyone knows any others that work using the invoke manager please post them.  I am looking mainly to invoke the camera app, specifically the video recorder.

 

Thanks.

Please use plain text.
Developer
Algorithmus
Posts: 16
Registered: ‎09-17-2012
My Device: Developer

Re: Using the InvokeManager to query targets

[ Edited ]

I found a list of IDs under the target file system navigator, but most of them don't work. I get the NoTarget error when it doesn't work. For example, I found sys.camera, sys.picturesviewer, sys.mediaplayer, etc. under the apps folder under System, along with the target IDs of all the other apps I made there. I tested it with one of those apps I know isn't set up to receive invocation and it returned the same error enum, so my best guess would be that any of those sys.[app] apps that don't work when they're invoked are not properly set up to receive invocation yet. I'd look for the Manifest.mf file to see if there is an invoke-target tag in there, but unfortunately, I can't access those files on system apps because I don't have permissions.

 

I'd also prefer to use the PIM library for contacts over invoking sys.pim.contacts (which also doesn't work), but there's been problems getting the library linked properly. I should save that for a different thread though.

Please use plain text.
BlackBerry Development Advisor (Retired)
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: Using the InvokeManager to query targets

I didn't forget about this :smileyhappy:

 

Update: InvokeManager.queryTargets will be coming back in an upcoming beta release.

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.