开发者

get a stream/file contents when associated with mimetype?

Using the manifest I can associate my application with开发者_Go百科 a mime-type (so the app starts when the user click a suitable link with that content-type in the browser). But I can't get the contents of the file. Is there any way to get this?

I know I can obtain the URI from the Intent instance, but I'd rather avoid the second call to the URI.

Thanks,

John.


I'm not sure I understand your question, but at the risk of stating the obvious:

Obtaining the URI from the intent instance needs close to no processing.

You're not making two calls to the URI. One operation is getting the URI string from the intent, then the second operation is using that URI as an address, fetching the image.

But thinking about what you could be doing, I assume when you say URI, you're talking about an address on the net which was passed to your app via another? In which case, if you have no control over the calling application, the only option you have is to fetch the image again. If you know the workings of the app, and it happens to store the images in a globally available area such as the SD card, you'd have to get the file location some how. If you have full control of the app, then it's easy, just send the address of the image on the SD card within the intent.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜