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
Developer
Posts: 27
Registered: ‎06-24-2013
My Device: Z10
Accepted Solution

Invoke target for multiple select

Hello,

 

I want my app to be able to be a "SHARE" invoke target if one or more pictures are selected.

I've seen WhatsApp is able to do this, how can I add this functionality to my own app?

It works like a charm for one picture, but it doesn't show my app if I select multiple files.

 

Kind regards,

Retired
Posts: 249
Registered: ‎07-14-2008
My Device: Not Specified

Re: Invoke target for multiple select

Developer
Posts: 27
Registered: ‎06-24-2013
My Device: Z10

Re: Invoke target for multiple select

Hello and thanks for your answer, but doesn't this only allow you to send invoke requests with multiple files? I want to receive them. I tried to use the mime types mentioned there in a receiver but it didn't work.
Retired
Posts: 249
Registered: ‎07-14-2008
My Device: Not Specified

Re: Invoke target for multiple select

Hi,
Can I see your code and what didnt work?

Shadid
Developer
Posts: 27
Registered: ‎06-24-2013
My Device: Z10

Re: Invoke target for multiple select

Well, I just added it to the bar-descriptor.xml, just as with the single file share.

Like this:

<invoke-target id="com.example.test">
		<invoke-target-type>card.composer</invoke-target-type>
		<invoke-target-name>Share Multiple</invoke-target-name>

		<filter>
			<action>bb.action.SHARE</action>
			<mime-type>filelist/image</mime-type>
		</filter> 
	</invoke-target>

 

Retired
Posts: 249
Registered: ‎07-14-2008
My Device: Not Specified

Re: Invoke target for multiple select

Try this:

<invoke-target id="com.example.test">
	<invoke-target-type>card.composer</invoke-target-type>
	<invoke-target-name>Share Multiple</invoke-target-name>
	<filter>
		<action>bb.action.SHARE</action>
		<mime-type>filelist/media</mime-type>
                <property var="uris" value="list://"/>
	</filter> 
</invoke-target>

 

For sharing multiple files from file manager, you should use filelist/mixed.

Highlighted
New Contributor
Posts: 3
Registered: ‎12-27-2012
My Device: Dev Alpha
My Carrier: BSNL

Re: Invoke target for multiple select

Why 'filelist/image' not working for registering invoke-target?
I even tried adding <property var="exts" value="jpg,png"/> to above snippet to filter images only but it didn't worked either.