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.

<intent-filter>
<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" />
</intent-filter>

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
 http://code.google.com/p/bites-android/source/browse/trunk/Bites/ 
--~--~---------~--~----~------------~-------~--~----~



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. Can WindowManagerService be replaced?

Dear All:

Can the WindwoManagerService be replaced dynamicly in run time? The reason I
ask for it is that I want to do something when any window appear on top of
window stack, or when it appears on screen, such as I can dynamicly add a
SurfaceView on it (The window is not created by me, it may be any window
currently exist or may be created in furture), and when it disappears I can
delete it. I think that I must customize the window manager service for
doing it, but can I make the result as an .apk file to install on mobile
device when published? Thanks.

Regards

--~--~---------~--~----~------------~-------~--~----~

2. youtube API

hi all,

is there have youtube API or lib (like jar file) in the Android?
I hope that can write a app like youtube on the htc mobile phone,
such that I can search video, and return the video information
(snapshot,video length,shard author..etc)

can somebody give me some suggestion?

thanks!
--~--~---------~--~----~------------~-------~--~----~

3. Android search in pictures (Informational post)

4. MapView.postInvalidate() triggers redundant call to onDraw()?

5. device shape configuration

6. Market style buttons

7. How to add external static libraries to Android.mk?