Open gmail attachments (xml) with another App

by Ben Caldwell » Fri, 07 Aug 2009 09:22:46 GMT

Sponsored Links
 My app uses the below intent filter to make itself an xml file reader
for the purpose of inserted data shared between users. This works fine
with xml files viewed in the browser but I can not make it work with
xml files sent as email attachments in the gmail app.

<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:mimeType="text/xml" />

When I check the logcat output I can see that the gmail app starts
downloading the attachment when I press the "Preview" button, but as
soon as my activity is brought to the front the attachment download is
cancelled and there is no data to parse.

I see in the intent created from the gmail app there are a couple of
ID numbers for the attachment. Perhaps someone has used these ID
numbers to grab file attachments from the gmail servers?

Anyone interested in how I am handling XML files so far please feel
free to peruse the source of my project at 

Open gmail attachments (xml) with another App

by Ben Caldwell » Sun, 09 Aug 2009 07:28:01 GMT

 OK, I've got this working and it wasn't so hard after all!

Thanks go to Alexey Krasnoriadtsev whose post got me heading in the
right direction -

Sponsored Links

Other Threads

1. Prodigy

I am developing a MIDI and MIDI recording program for the G1 platform
and Android .  Who is the person that can test my working draft ?
(  program known as Prodigy )



2. any Silicon Valley Android programmers here?

I've just moved to Santa Clara, have programmed in C#, and write HTML,
CSS.    Would like to learn about Android.   Wonder if there is any
group in Silicon Valley?  I find i learn very quickly watching someone
hands-on writing code.   thanks.


3. Mobile Theory

4. Problem when running SoundRecordingAPISample of Megha

5. ADT 0.8.0 Eclipse plugin download taking FOREVER

6. emulator (android-sdk-windows-1.0_r1) can not re run app after app crahsed

7. What's max display resolution size on android?