开发者

Android Intent lifecycle

I'm a bit confused about my intent lifecycle. I have a file browser which lets me nav to a particular graphic file, I fire up an intent to view that file and away we go. Back key returns me to the file browser. Also, from advice h开发者_如何学Cere (from Phylum Tea) I can now browse to a file via the web or a 3rd party file browser like Astro. All good.

My problem comes when, having opened a file from the web, it displays great, back key returns me to the web browser, but then when I choose a different file to view in my intent, the first file is still there. When I backed out of my viewer after the first file the intent remained alive and now (from the web browser) the subsequent files are not being passed through to the viewer, we are just bringing the original intent, with its contents, back into view.

So my Q: When using an intent to view a file brought in other-than through my inbuilt file browser, what do I do at onClose() to make sure the intent is terminated? And how do I distinguish that situation from opening a file via my own file browser?

Hope this makes sense!

tVm for any advice.

Baz


If I understand your question correctly your asking if you can control how long an Intent lasts? It's just a message, it doesn't bounce around in the System.

You fire off an Intent, an application catches it, reacts, and that is it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜