开发者

Difference between 2 URI

I'm trying to save attachment (mms and GM开发者_运维知识库ail)

Uri uri; 
uri = Uri.parse("content://mms/part/" + mmsPartId);  
uri = Uri.parse("content://gmail-ls/messages/email@gmail.com/messageId/attachments/0.1/BEST/true");

InputStream inputStream = getContentResolver().openInputStream(uri);

openInputStream works fine for mms, but for GMail i got error: "open attachments that are on the sd card with the direct path to the attachment"

I don't understand what "direct path to the attachment"?


Using hand-written strings like this is very likely to result in you writing an app that breaks. In particular -- there is no definition in the SDK for interacting with gmail. Gmail is not part of the SDK. You can't count on this working; it is an implementation detail of gmail that can change arbitrarily at any time. (Gmail isn't even part of the platform; it is basically just some random app, that happens to be written by Google, that you are trying to poke inside of.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜