How get my file from attachment under Android ?

Ludovic THEBAULT ludovic.thebault at laposte.net
Sat Mar 21 12:26:00 EDT 2015


> Le 19 mars 2015 à 20:39, Ludovic THEBAULT <ludovic.thebault at laposte.net> a écrit :
> 
> 
> Le 18 mars 2015 à 17:57, Mark Schonewille <m.schonewille at economy-x-talk.com <mailto:m.schonewille at economy-x-talk.com>> a écrit :
> 
>> Hi Ludovic,
>> 
>> You need to add intent filters to the manifest. More info at
>> http://stackoverflow.com/questions/3760276/android-intent-filter-associate-app-with-file-extension <http://stackoverflow.com/questions/3760276/android-intent-filter-associate-app-with-file-extension>
>> 
>> You need to find a way to change the manifest before the standalone is built or to unpack the apk, change the manifest and repack it.
>> 
> 
> Thanks !
> 
> It is not recommended  to modify the "Manifest.xml" directly on the livecode folder app ?
> How modify it during the standalone saving ? With the savingMobileStandalone handler but how intercept the "Manifest" file ?
> 
> Note (OT) : there is a big bug when you have accentued chars in the names of files (or folders) you want to add to the standalone (with the "copy files" section of the Standalone Settings). There is always a "APK preparation failed" : Bug 12406 <http://quality.runrev.com/show_bug.cgi?id=12406>


So, i added these lines into the manifest.xml file :

	  <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 :
content://gmail-ls/my.email@gmail.com/messages/18/attachments/0.0/BEST/false <content://gmail-ls/my.email@gmail.com/messages/18/attachments/0.0/BEST/false> from gmail
or content://com.android.email.attachmentprovider/2/20/RAW <content://com.android.email.attachmentprovider/2/20/RAW> from an another mail.

i cannot read the content of this URI 
How do that ?

Thanks again.







More information about the use-livecode mailing list