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
ekke
Posts: 1,571
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone
Accepted Solution

cannot access file (email->attachment->invoke APP)

I have some scenarios where I'm sending files through BBM or attached to email messages.

 

these files have a custom suffix, so I can invoke my app

 

this is the workflow using BBM Messages:

(based on this thread and Mark Sohms hint)

 

  • Target BBM user has to accept the file transmission
  • Target BBM has to save the file anywhere per ex. shared/downloads
  • Tapping on the file from within BBM opens my target application
  • my invoke handler was called
  • I'm getting the URI and can read the file content :smileyhappy:

this workflow is easy to follow

 

this is the workflow using email Messages:

 

  • Target device gets email in HUB
  • Tapping on the attachment ivokes my app
  • my invoke handler was called
  • I'm getting the URI, but in this case I couldn't read the file
    • error: permission denied :smileysad:

 

this is the URI I'm getting:

file:///accounts/1000/invoke/<invoke target id>/xa00000000001a0/<file name.ext>

 

the only way to get this open:

  • long press on attachment
  • save anywhere
  • from FileManager
    • navigate to the file
    • tap on the file
    • app is invoked
  • now I can read the file

 

this is not a very intuitive way fort he user ;-)

 

any idea to get access to the file directly from email message ?

already tried to add permissions for email

 

 

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner
Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: cannot access file (email->attachment->invoke APP)

Hi Ekke,
you can find the related JIRA here:
https://www.blackberry.com/jira/browse/BBTEN-1200

I created it on 03.05.2013, did not get updates on it for a long time now though.

And the thread where we analyzed the issue:
http://supportforums.blackberry.com/t5/Native-Development/Access-a-shared-file-from-invocation-targe...

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
ekke
Posts: 1,571
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: cannot access file (email->attachment->invoke APP)

thx Simon,

 

voted for the Issue and added comment

 

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner
Developer
ekke
Posts: 1,571
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: cannot access file (email->attachment->invoke APP)


simon_hain wrote:
Hi Ekke,
....
And the thread where we analyzed the issue:
http://supportforums.blackberry.com/t5/Native-Development/Access-a-shared-file-from-invocation-targe...


from a comment in the other Thread I learned, that it works if the APP is not running and opened through the invocation.

problem only if app is opened and invoked then.

 

will close this Thread and follow the other one

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner