Intent with setType(“message/rfc822”) for Android API Level before 2.3.3

前端 未结 3 1248
南方客
南方客 2021-01-13 19:15

I have a problem with setting type "message/rfc822" for intent to send e-mail with file attachment on Android emulator

3条回答
  •  遥遥无期
    2021-01-13 20:02

    First, "to avoid a lot of applications in select list for user's choice", use ACTION_SENDTO and a mailto: Uri.

    Second, what you are experiencing is not "a problem of Android emulator" nor "old APIs". You need 1+ applications that are capable of handling the ACTION_SEND Intent and a MIME type of message/rfc822. There is no guarantee that any given device will support that combination, let alone any given emulator. Your code needs to handle that, just as if you use ACTION_GOBBLEDYGOOK or a MIME type of thisis/sonotreal or whatever.

提交回复
热议问题