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
New Developer
Posts: 13
Registered: ‎03-02-2013
My Device: 9900 / DevAlpha
My Carrier: VodafoneNL

[Invoke / PDF] How to open a File in Adobe Reader?

I'm trying to open a File in Adobe Reader using the Following InvokeActionItem:

 

InvokeActionItem {
	ActionBar.placement: ActionBarPlacement.OnBar
	title: "Adobe"
	imageSource: "asset:///images/ic_adobe.png"
				                        
	query{
	    mimeType: "application/pdf"
	    invokeTargetId: "com.rim.bb.app.adobeReader"
	    uri: "file:///accounts/1000/shared/downloads/test.pdf"
	    invokeActionId: "bb.action.OPEN"
	}
}

 I've also registered the Native Adobe Reader App within the Bar-descriptor:

    <invoke-target id="com.rim.bb.app.adobeReader">
        <invoke-target-name>Adobe Reader</invoke-target-name>
        <icon><image>icon.png</image></icon>
        <type>application</type>
        <filter>
            <action>bb.action.OPEN</action>
            <mime-type>image/pdf</mime-type>
        </filter>
    </invoke-target>

 Where does it go wrong?

Developer
Developer
Posts: 227
Registered: ‎01-17-2012
My Device: PB
My Carrier: ATT

Re: [Invoke / PDF] How to open a File in Adobe Reader?

not sure 'bout your DevAlpha, but mine doesn't have Adobe Reader, so can't invoke it...

 

Regards,

New Developer
Posts: 13
Registered: ‎03-02-2013
My Device: 9900 / DevAlpha
My Carrier: VodafoneNL

Re: [Invoke / PDF] How to open a File in Adobe Reader?

I'm running a version which includes Adobe Reader, so this isn't the issue =).
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: [Invoke / PDF] How to open a File in Adobe Reader?

You dont need to register for the Adobe Reader, that is only if you want to be a target.

You can exclude the mimeType and target id, just supply the action (open) and the file URI.  The invocation broker will determine the best app to open up the file (based on the extension).

Highlighted
Developer
Developer
Posts: 227
Registered: ‎01-17-2012
My Device: PB
My Carrier: ATT

Re: [Invoke / PDF] How to open a File in Adobe Reader?

could you perhaps share the secret of obtaining Adobe Reader?

 

Regards,

New Developer
Posts: 13
Registered: ‎03-02-2013
My Device: 9900 / DevAlpha
My Carrier: VodafoneNL

Re: [Invoke / PDF] How to open a File in Adobe Reader?

@jtegen: I've aleady implemented it that way, but BlackBerry 10 decides that "the Native Browser" is the best App to open up an *.pdf file and I wish to go directly into the Adobe Reader App.
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: [Invoke / PDF] How to open a File in Adobe Reader?

Then the target id addition should be sufficient. Adding the mime type might be over constraining it.