android:name=".PhotostreamActivity"
android:label="@string/application_name">
android:host="flickr.com"
android:pathPrefix="/photos/" />
android:host="www.flickr.com"
android:pathPrefix="/photos/" />
一旦进入你的activity的时候,你需要寻找的动作,然后做你已经交到URL的东西。 Intent.getData()方法给你一个Uri。
final Intent intent = getIntent();
final String action = intent.getAction();
if (Intent.ACTION_VIEW.equals(action)) {
final List segments = intent.getData().getPathSegments();
if (segments.size() > 1) {
mUsername = segments.get(1);
}
}
应当注意的是,这个应用程序是越来越有点过时(1.2)的,所以你会发现有实现这一目标的更好的方法。