Is there any documentation on principles behind using URIs on Android platform? For example, I have an application that allows user to read particular forums. It has a couple of activities - one for viewing list of forums,开发者_开发问答 one for viewing list of threads, one for viewing list of posts, etc.
I'd like to use a hierarchical URI in my activities' intents to indicate what an activity should display. Is it a good idea? If so, what is the best way to formulate those URIs?
For example, should I use my own scheme like myforums:
or content:
scheme?
Use standard http URIs for viewing public web content and set up your intent filter based on the host/path. Some illustrations of this include Android Market, which will open links to apps on http://market.android.com while the site itself will open in any browser. The YouTube app will open direct links to videos as well.
Using http URIs means that shared links to that content may be opened from any browser on any platform if your app is not present, but the app can take over when it's there to provide a richer or more optimized experience.
精彩评论