다른 URL을 식별하고 특정 활동으로 열어 보겠습니다.매니페스트의 Android URL 스키마
나는 매니페스트에 인 텐트 필터를 선언하고 나는 간단한 조건을 사용하는 경우 그것은 작동 :
<data
android:host="www.myhost.fr"
android:pathPattern="/.*\\.shtml"
android:scheme="http" />
나는 "이야기"와 "비디오"와 같은 핵심 단어를 구분하려면
, 나는 이런 내 pathPattern을 변경합니다.활동 이야기 :
<data
android:host="www.myhost.fr"
android:pathPattern="/.*story\\.shtml"
android:scheme="http" />
활동 비디오 :
<data
android:host="www.myhost.fr"
android:pathPattern="/.*video\\.shtml"
android:scheme="http" />
편집 내가 차단하려고 의 URL :
- URL 이야기 : http://www.myhost.fr/lot_of_useles_text4085280/story.shtml
- URL 비디오 : http://www.myhost.fr/lot_of_useles_text309434/video.shtml
- URL 일치 : http://www.myhost.fr/lot_of_useles_text/match_mtc616710.shtml ID입니다 이야기 및 비디오 "/"전에 거쳐 생산
. 성냥을 위해, 그것은 다르다.
이 솔루션을 테스트 할 때 패턴이 인식되지 않습니다. 내가 웹에서 regex에서 테스트한다면, 그것이 맞다고 말하고있다.
아이디어가 있으십니까?
정확히 일치 하시겠습니까? – Andros
눈치 채어 주셔서 감사합니다. – Seynorth
100 % 확신 할 수 없으므로 답변을 만들지는 못하지만 시도해 볼 수는 있습니다 : "/.*/video.shtml" – Andros