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
Contributor
Posts: 38
Registered: ‎09-06-2013
My Device: BlackBerry Z10
My Carrier: Claro
Accepted Solution

InvokeActionItem Not visible on Z30

Hello guys, I developed an application that uses InvokeActionItems on the status bar to invoke actions like sharing on facebook or NFC, when I applied to BFB, it got rejected because those items were not visible on the bar and it just had the "back" button, however, my app deploys perfectly over Q10 and Z10. Any suggestions about it?

 

Here is a bit of my code: 

 

InvokeActionItem {
            ActionBar.placement: ActionBarPlacement.OnBar
            title: qsTr("       Share on FB                             ")//qsTr("Post")
            
            query {
                mimeType: "image/jpeg"
                invokeTargetId: "Facebook"
                invokeActionId: "bb.action.SHARE"
                // Share an image that is packaged with the app
                uri: _dirPaths.files + "1Meme.jpg"
            }
        }

 



_______________________________________________________
If you've been helped click on Like Button, if you've been saved download the app.

Developer of Easy Memes
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: InvokeActionItem Not visible on Z30

Did the tester's response specifically mention the Z30 then?

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Contributor
Posts: 38
Registered: ‎09-06-2013
My Device: BlackBerry Z10
My Carrier: Claro

Re: InvokeActionItem Not visible on Z30

Yes, that's what he said. on the Z30 there is only the Back Button



_______________________________________________________
If you've been helped click on Like Button, if you've been saved download the app.

Developer of Easy Memes
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: InvokeActionItem Not visible on Z30

Did you test your app under 10.2 as I find it hard to believe the device has any relevance.


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: InvokeActionItem Not visible on Z30

You may have trouble with that if you load the developer build, as those invoke action items won't show up without the proper app installed.

 

Are you sure you want to create an invoke action item for each service? Why not just one generic share button that lets the user decide? That way, if they install another 3rd party app that can handle the Share action they can use that as well.

 

If you weren't aware, if you don't specify the target ID with the share action you will get a generic button that brings up a share menu for the user to pick from.

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: InvokeActionItem Not visible on Z30

@PBernhardt, are you saying that testing is sometimes done on developer builds?


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: InvokeActionItem Not visible on Z30

No, I'm saying you will have difficulty testing those action items on a developer build, as the apps aren't there. BFB testing does not occur on Developer builds.
Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: InvokeActionItem Not visible on Z30

[ Edited ]

Thanks good to know (about the testing, hopefully should be fairly obvious you can't invoke an app that isn't there).

 

So that still leaves the mystery about why it only failed on a Z30.


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: InvokeActionItem Not visible on Z30

I've done some digging around and unfortunately It looks like the problem is caused by a known issue with InvokeActionItem. Basically, on 10.2 if you specify an invokeTargetId it will fail, which will cause the ActionItem to not appear on the action bard.

 

I've created this issue in DIT to track it: https://www.blackberry.com/jira/browse/BBTEN-1765

 

I would still recommend a generic share button (with no target specifed). If you want a workaround for where you specify a target, you will have to build a custom class that handles it in the C++ layer, as the normal InvokeManager stuff still works.

 

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Highlighted
Developer
Posts: 358
Registered: ‎04-13-2013
My Device: Z10
My Carrier: Telus

Re: InvokeActionItem Not visible on Z30

I've been using 10.2 on my Dev C and a 10.2 leak on my Z10 and I've had no issues attaching an invocation then calling it from a normal Action Item like so:

 

attachedObjects: [
        Invocation {
            id: rateApp
            query {
                invokeTargetId: "sys.appworld"
                uri: "appworld://content/34825892"
                invokeActionId: "bb.action.OPEN"
            }
        }
]
Actions: [
ActionItem {
                title: qsTr("Rate App") + Retranslate.onLocaleOrLanguageChanged
                imageSource: "asset:///images/ic_add_entry.png"
                onTriggered: {
                    rateApp.trigger("bb.action.OPEN")
                }
            }
]