hello Mark. thank you for your help.
what's you mean "using a standard MIME type" ?
do you mean should I change my file extension to some well-known one
(ex: txt, jpg..) ?
I don't know how mail client decide mime type of attached file. and I
tried to change my extension to a some well-known one. (.pdf)
but the situation is same as follow
--------------------------------
01-28 22:50:28.518: INFO/ActivityManager(59): Starting activity:
Intent { act=android.intent.action.VIEW dat=content://
com.android.email.attachmentprovider/1/9/RAW flg=0x80001 }
--------------------------------
so please tell me how can I use standard mime type.
my custom file is a base64-encoded text. and its content is some SEED-
encrypted html file.
so I use ".smail" extension on my file.
On 1월29일, 오전4시15분, Mark Murphy <[email protected]> wrote:
> On Fri, Jan 28, 2011 at 7:20 AM, hansolo <[email protected]> wrote:
> > I'm trying to make an app which is automatically started when user try
> > to open a some attached file (which has a custom extension) on mail
> > client.
>
> You are much better served using a standard MIME type.
>
> > my logcat show as follow when I try to preview an attached file on
> > mail client.
> > --------------------
> > 01-28 11:55:37.078: INFO/ActivityManager(59): Starting activity:
> > Intent { act=android.intent.action.VIEW dat=content://
> > com.android.email.attachmentprovider/1/3/RAW flg=0x80001 }
>
> And this is why you need a standard MIME type, as email attachments
> have no extension in their content Uri values.
>
> > and I tried following intent filter
> > ----------------------
> > <intent-filter>
> > <action
> > android:name="android.intent.action.VIEW" />
> > <category
> > android:name="android.intent.category.DEFAULT" />
> > </intent-filter>
> > ---------------------
>
> > but this filter failed to catch that intent.
>
> Of course.
>
> > so, please help me. what filter should I build to catch this intent?
>
> Use a standard MIME type -- one the email client is likely to
> understand and use with the attachment. Then, add a <data> element to
> your filter with an android:mimeType attribute that is the MIME type
> you are using.
>
> --
> Mark Murphy (a Commons
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training in London:http://bit.ly/smand1andhttp://bit.ly/smand2
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en