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
Trusted Contributor
Posts: 140
Registered: ‎11-23-2010
My Device: Torch 9800
My Carrier: Rogers
Accepted Solution

How to add the share card on

Is there a way to show the share action card when a user long press a container ? I've been trying this

 

        contextActions: [
            ActionSet {
                actions: [
                    ActionItem {
title: "Share" attachedObjects: [ InvokeActionItem { query { mimeType: "text/plain" invokeActionId: "bb.action.SHARE" } } ] } ] } ]

 but when I click on the action nothing happens + the icon is a cogwheel when it's supposed to be a triangle thingy

 

Thank you

Highlighted
Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: How to add the share card on

[ Edited ]

Maybe this thread will help:

http://supportforums.blackberry.com/t5/Cascades-Development/how-to-share-URLs-using-InvokeActionItem...

 

I'm not sure if onTriggered is needed. Try setting the data when initializing the query.

 

upd - I've just noticed that you're creating InvokeActionItem inside of ActionItem. Just create the InvokeActionItem directly instead.


Andrey Fidrya, @zmeyc on twitter
Trusted Contributor
Posts: 140
Registered: ‎11-23-2010
My Device: Torch 9800
My Carrier: Rogers

Re: How to add the share card on

How do I link it with my ActionItem?
Trusted Contributor
Posts: 140
Registered: ‎11-23-2010
My Device: Torch 9800
My Carrier: Rogers

Re: How to add the share card on

NVM I think I understand. Let me try
Trusted Contributor
Posts: 140
Registered: ‎11-23-2010
My Device: Torch 9800
My Carrier: Rogers

Re: How to add the share card on

You are right

 

        contextActions: [
            ActionSet {
                InvokeActionItem {
                    title: "Share"
                    query {
                        mimeType: "text/plain"
                        invokeActionId: "bb.action.SHARE"
                    }
                }
            }
        ]

 works now!

 

Thank you