Get files from attachments ? How translate URI ?

The place to discuss anything and everything about running your LiveCode on Android

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
ludo
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 72
Joined: Mon Dec 03, 2007 6:10 pm

Get files from attachments ? How translate URI ?

Post by ludo » Sat Mar 21, 2015 5:44 pm

Hello,

i added these lines into the manifest.xml file to launch my app when the user want to open an .ext attachment from one email :

Code: Select all

	  <intent-filter>
                <data android:scheme="content" />
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!-- open any mime type file -->
                <data android:mimeType="application/*" />
                <data android:mimeType="text/*" />
                <data android:pathPattern=".*\\.ext" />
            </intent-filter>
where .ext is the extension of my file.

If i open the file as attachment my app is launched as excepted but the url passed to the urlwakeup handler is like that :

Code: Select all

content://gmail-ls/my.email@gmail.com/messages/18/attachments/0.0/BEST/false 
from gmail
or

Code: Select all

content://com.android.email.attachmentprovider/2/20/RAW
from an another mail.

i cannot read the content of this URI.
How do that ? For android developer there is a solution : http://stackoverflow.com/questions/5657 ... ontent-uri but for livecode ?
I didn't found any command in the dictionary.

Thanks

Post Reply

Return to “Android Deployment”