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: 19
Registered: ‎01-09-2014
My Device: BB Q5
My Carrier: Vodafone
Accepted Solution

why is it not working ? :\

 Tab {
            title: qsTr("Facebook")
            imageSource: "asset:///images/ic_facebook.png"
            Page {
                id: facebookTab
                actions: [
                    // Facebook - update status
                    InvokeActionItem {
                        ActionBar.placement: ActionBarPlacement.OnBar
                        title: qsTr("Update Status")
                        query {
                            mimeType: "text/plain"
                            invokeTargetId: "Facebook"
                            invokeActionId: "bb.action.SHARE"
                        }
                        onTriggered: {
                            data = _socialInvocation.encodeQString(fbShare.statusText);
                            console.log(data);
                        }
                    }

 

 

I am using a tabbed pane, acc. to above code there should be a action item saying "Update Status" and it should appear on the action bar .......... but it is not happening !!

 

WHY IS IT SO ?

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

Re: why is it not working ? :\

At first glance it looks correct are you getting anything showing when the app starts?

Are you seeing any warnings or errors in the console?


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.
Developer
Posts: 188
Registered: ‎07-19-2012
My Device: Z10 Limited Edition and Dev Alpha C
My Carrier: Movistar-Venezuela

Re: why is it not working ? :\

I have it as follows.

 

       InvokeActionItem {
            //ActionBar.placement: ActionBarPlacement.OnBar
            title: qsTr("Post")
            imageSource: "asset:///images/main/fb.png"
            query {
                mimeType: "text/plain"
                invokeTargetId: "Facebook"
                invokeActionId: "bb.action.SHARE"
            }
            onTriggered: {
                data = facebookl.text
            }
        },

 

     Label {                            
id: facebookl text: qsTr(" -Like www.facebook.com/marcossit") visible: false }

 This works as long as you have built your app SocialInvocation

 

 

http://downloads.blackberry.com/upr/developers/downloads/sampleapps/cascades/socialinvocation.zip

 

I hope to serve you, anything feel free to ask.


Follow me in Twitter:

@Marcossit

BBM Channel:

MarcossitDev: C0002C366  

DeviceSuite For BlackBerry 10:

Link to Download DeviceSuite:

Support was successful? Accept as Solution and click on:


Developer
Posts: 19
Registered: ‎01-09-2014
My Device: BB Q5
My Carrier: Vodafone

Re: why is it not working ? :\

No , its not working , and yes its the SocialInvocation only :\

 

It is running with no errors OR warnings, but why is the action item not visible ?

Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: why is it not working ? :\

What OS are you testing on? There was a bug with specifying the target that was present in 10.2 I believe. Should be fixed in 10.2.1.

 

In general, I'd recommend just using the generic Share button unless you have a really good reason (and even then, you probably want both). The user may have many non-standard apps they want to share too, like Blaq instead of the official Twitter client.

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: 19
Registered: ‎01-09-2014
My Device: BB Q5
My Carrier: Vodafone

Re: why is it not working ? :\

I trying to run this app : http://downloads.blackberry.com/upr/developers/downloads/sampleapps/cascades/socialinvocation.zip

 

It is running without any errors or warnings .......... but it is logically incorrect, although the code seems right when we read it, but the excpected result is not generated (not able to share status,images, etc) ... what is the issue here ?

Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: why is it not working ? :\

Again, what OS version are you using? That sample will not work on 10.2.

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: 188
Registered: ‎07-19-2012
My Device: Z10 Limited Edition and Dev Alpha C
My Carrier: Movistar-Venezuela

Re: why is it not working ? :\

Share or option not working Post as there were problems with the framework but from OS10.2.1.1925 is enabled try to install the latest OS to your computer and do the test again.

Follow me in Twitter:

@Marcossit

BBM Channel:

MarcossitDev: C0002C366  

DeviceSuite For BlackBerry 10:

Link to Download DeviceSuite:

Support was successful? Accept as Solution and click on:


Developer
Posts: 19
Registered: ‎01-09-2014
My Device: BB Q5
My Carrier: Vodafone

Re: why is it not working ? :\

It is working now, actually the mistake that I was doing was that runnig this socialinvocation app on simulator where we dont have native apps like FB, twitter, etc by default ...... so it therefore does not show the POST option in the action bar when you go to Facebook tab(for example) ...... 

 

Thank You Smiley Happy