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
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA
Accepted Solution

Sharing over BBM

I'm trying to share a file over BBM, which is invoked from my app.

 

The file is stored under my assets in my app.

 

It works fine when I store the asset in file:///accounts/1000/shared/misc/ but I am having problems when the file is stored inside the app.

 

I have tried the following:

 

request.setUri(QUrl(QDir::currentPath() +"/app/native/assets/myfile.txt"));

 

request.setUri("asset:///myfile.txt");

 

Does anyone know the path to the assets folder that will work with BBM?

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Trusted Contributor
Posts: 207
Registered: ‎05-02-2010
My Device: various
My Carrier: AT&T

Re: Sharing over BBM

[ Edited ]

what are you using as your actionID?

 

From the documentation: https://developer.blackberry.com/cascades/documentation/device_platform/invocation/bbm.html

 

 

So should be something like this in qml:

 

InvokeActionItem {
                    title: "Send File"
                    id: invokeBBM
                    query {

                     invokeTargetId: "sys.bbm.sharehandler"
                    invokeActionId: "bb.action.SHARE"
                    uri: "file:///asset/myfile.doc"
                }                

 

If you are the original poster (OP) and your issue is solved, please remember to click the "Accept as Solution" button so that others can more easily find it. If anyone has been helpful to you, please show your appreciation by clicking the Star on the left of their post.
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Sharing over BBM

InvokeManager invokeManager;
InvokeRequest request;
request.setTarget("sys.bbm.sharehandler");
request.setAction("bb.action.SHARE");
request.setUri(????????);

 BBM is invoking fine when I send a file on the users system. BBM isnt the issue here, it's the file path to the file inside the app's assets.

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Trusted Contributor
Posts: 207
Registered: ‎05-02-2010
My Device: various
My Carrier: AT&T

Re: Sharing over BBM

Understood. Let me test a few minutes and let you know what I find.

If you are the original poster (OP) and your issue is solved, please remember to click the "Accept as Solution" button so that others can more easily find it. If anyone has been helpful to you, please show your appreciation by clicking the Star on the left of their post.
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Sharing over BBM

Ah this works:

 

"file:"+QDir::currentPath()+"/app/native/assets/myfile.txt"

 

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Trusted Contributor
Posts: 207
Registered: ‎05-02-2010
My Device: various
My Carrier: AT&T

Re: Sharing over BBM

beat me to it! lol.

If you are the original poster (OP) and your issue is solved, please remember to click the "Accept as Solution" button so that others can more easily find it. If anyone has been helpful to you, please show your appreciation by clicking the Star on the left of their post.
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Sharing over BBM

Thanks for your help!
--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Trusted Contributor
Posts: 207
Registered: ‎05-02-2010
My Device: various
My Carrier: AT&T

Re: Sharing over BBM

Not a problem at all. I am still learning (obviously hah) but willing to help where I can. You dont have any thoughts on this do you?

 

http://supportforums.blackberry.com/t5/Cascades-Development/InvokeActionItem-not-recognized-does-not...

If you are the original poster (OP) and your issue is solved, please remember to click the "Accept as Solution" button so that others can more easily find it. If anyone has been helpful to you, please show your appreciation by clicking the Star on the left of their post.
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Sharing over BBM

I'm afraid I don't use QML. Sorry.
--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Trusted Contributor
Posts: 207
Registered: ‎05-02-2010
My Device: various
My Carrier: AT&T

Re: Sharing over BBM

Thanks for taking a look! Smiley Happy
If you are the original poster (OP) and your issue is solved, please remember to click the "Accept as Solution" button so that others can more easily find it. If anyone has been helpful to you, please show your appreciation by clicking the Star on the left of their post.