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
Highlighted
Developer
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
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 Smiley Happy

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 Smiley Sad

 

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 native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner
Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

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
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
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 native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner
Developer
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
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 native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner