2011/1/28 hansolo <[email protected]>:
> what's you mean "using a standard MIME type" ?

I mean "using a standard MIME type", where by "standard" I mean one
that a random email client might actually use when constructing an
email message with an attachment. You can invent your own MIME types,
and that can work OK with Web servers, but email clients won't know to
use them, generally.

> do you mean should I change my file extension to some well-known one
> (ex: txt, jpg..) ?

Only if the file is of that format.

> I don't know how mail client decide mime type of attached file.

Most map file extensions to MIME types, AFAIK.

> 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.

I would have expected that the Email app would use the MIME type
embedded in the email information for the attachment, and that the
MIME type would therefore have appeared in the Intent.

Make sure the email you are looking at has the MIME types in it, by
looking at the raw email message itself.

> 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.

I will be fairly stunned if you ever get that to work. I suggest that
you reconsider the use of email as a means of distributing your files.
For example, if your emails have links to files, and the files are
served by Web servers, you have much greater control over how MIME
types are handled.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in London: http://bit.ly/smand1 and http://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

Reply via email to