Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

AIR / Android, content-URI to AS3-file-path

Guest
Mar 15, 2013 Mar 15, 2013

Hey guys, i need help.

I registered some file-extensions for my AIR-Android-App, so when a file is selected, my app receives an Invoke-Event in Flash/AS3 with the path to that file.This works fine for files/downloads/links.

However, some Applications provide a a content-uri instead of a direct file-path (e.g. eMail-attachments before they are downloaded, hell, even local download folders on newer Android OS).

e.g.:

content://gmail-ls/houseatreides@gmail.com/messages/6/attachments/0.1/BEST/false

QUESTION:

How can i turn this into something i can load in AIR/AS3.

Or how can i order the other application or a service to catch the file for me?

If its not possible in AIR, does anyone know of an ANE that gets the job done ?

I found a post how to do it native in Java.

Confirmation that it is (currently) not possible in AIR is also welcome. Thank you.

verdave

TOPICS
Development
3.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 26, 2013 Apr 26, 2013

Hey guys,

Well, I could not find any ANE for that (start contentProvider / contentResolver).

Before i start reading Native-Extension-Tutorials tomorrow:

If you think there are any reasons why this is essentially not possible at all (for whatever reason, restrictions, security, streaming etc), let me know.


thx,

V.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
May 08, 2013 May 08, 2013

Did you ever figure this out?  I would also be interested in getting this to work.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 10, 2013 May 10, 2013

Unfortunately there are higher priorities in the todo list. For now, we just scan if the invoke-argument starts with a content-scheme and tell the user to download it before opening.  If he is sure he already downloaded the file (and still has the content-scheme) we show a file-selection with the most recent downloads. 

Not the most elegant way, but it works.

The whole intent stuff is flawed - not inherently - the basic concept is very good.

But the developers of other apps (e.g. Mail-Client) tend to dispatch so many different intents/mimetypes/files/content for the same task/media that its impossible to register for the correct intent/filetype.

I finally installed a nice little App called "IntentIntercept" on Android. Great for analysing whose app sends which intent. It turned out different mail-clients convert mimetypes while sending and then dispatch the wrong intent...  Gmail works more reliable than the native mail apps, but its clusterf# because there no standard and your own apps reliability depends on other apps working correctly.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 29, 2013 Nov 29, 2013

I had a custom ane developed for text files that allows you to take the content uri and capture the text file in a string.  What mimetype were you trying to get?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 26, 2014 Feb 26, 2014
LATEST

mola2alex schrieb:

I had a custom ane developed for text files that allows you to take the content uri and capture the text file in a string.  What mimetype were you trying to get?

Would you please share the ANE with me? You would make my day!

This is my email, please contact me: blog@wolke7.net

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines