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. How can I get current SDK version in my program code ?

Can I get current SDK version (like 1.0 or 1.5)in the program code?
I  try to use the PackageInfo way like:

2. Flicker for widgets when pressing the touchscreen for android-1.5 and android-2.6.29 kernel version

      I get a flicker for the screen, when I press and hold the touch
screen for a while. If I click on the drawer, etc, the animation is
very smooth and I have no problems.

But when I press and hold the touchscreen or if I am using the soft
touch keyboard, I get an intermittent flicker, and it exposes the
image from the previous screen intermittently. I am using a software
OpenGL implementation, with a TI OMAP 3503 processor (Gumstix Overo

It appears to be the image contained in the previous page of the
framebuffer. I have set yres_virtual to 2 time the yres, and the
system I works fine. However, this intermittent flicker artifact still

Any one else notice this problem and have a solution for this?

Best regards,



3. How to use to build a project with JNI library calls?

4. CAMERA_STUB feature in android

5. How to make mmc partition read only yet, make /system /data writeable

6. Problem launching an Activity (other than built-in with classes loaded) from widget click

7. How to make mmc partition read only yet, make /system /data writeable