I am trying to use intent filter to open URLs in my application (as opening http://market.android.com/ opens the Android Market).
According to docs I’ve found, with this code, opening http://seenthis.net/people/progval in the browser should open my application:
<activity android:name=".ShowUserActivity" android:permission="android.permission.INTERNET">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category
android:name="android.intent.category.DEFAULT" />
<category
android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="http"
android:host="seenthis.net"
android:pathPattern="/people/.*" />
</intent-filter>
</activity>
But it does not.
Here is the activity:
public class ShowUserActivity extends ListActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.d("SeenDroid", "called");
String url = getIntent().getDataString();
if (url != null) {
Log.d("SeenDroid", url);
}
// ...
}
// ...
}
But nothing is logged to the logcat.
Regards,
ProgVal
You need to remove
android:permission="android.permission.INTERNET"from youractivitydeclaration.