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: 146
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C
My Carrier: Telefonica Spain

FileTransferMode has no effect

Hi boys. I'm working with InvokeActionItem, and i have a little problem.

 

I want share a file located in data folder of my app. This is my code :

InvokeActionItem *aShare = InvokeActionItem::create(InvokeQuery::create()
  .mimeType("image/jpg")
  .uri("file:///accounts/.....myapp/data/myphoto.jpg")
  .fileTransferMode(bb::system::FileTransferMode::CopyReadWrite)
  .invokeActionId("bb.action.SHARE")).title("Share");

 but dont work. The image is not displayed at share sheet, bluetooth option ( only the generic "flower" image ).

 

FileTransferMode not working ?

Is this related with this known issue at release notes ?

6052188	The invoked(const bb::system::InvokeRequest&) signal of the InvokeManager class emits the incorrect signal for setFileTransferMode(FileTransferMode::Type type). 

 Thanks !!

 

---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook
Developer
Posts: 146
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C
My Carrier: Telefonica Spain

Re: FileTransferMode has no effect

Any idea ?

---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook
Developer
Posts: 146
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C
My Carrier: Telefonica Spain

Re: FileTransferMode has no effect

Ok, better explain. If i want, for example, preview with a card or external application a image file located inside my app sandbox, I can't.

 

InvokeRequest iRequest;
iRequest.setAction("bb.action.VIEW");
iRequest.setFileTransferMode(FileTransferMode::CopyReadWrite);
iRequest.setMimeType("image/jpg");
iRequest.setUri("file:///accounts/1000/appdata/myapp/data/myimage.jpg");
iRequest.setTarget("sys.pictures.card.previewer");
InvokeTargetReply *reply = iManager->invoke(iRequest);
reply->setParent(this);

Image previewer card can't display "myimage.jpg".

InvokeRequest::setFileTransferMode() would must copy the file in card's inbox, but has no effect.

 

---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook
Developer
Posts: 146
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C
My Carrier: Telefonica Spain

Re: FileTransferMode has no effect

Reported at JIRA with code BBTEN-451
---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook