본문 바로가기

Android

[Android] dynamic link 적용 후 폰에 앱이 보이지 않는 문제

안녕하세요 디안입니다.

 

dynamic link를 적용한 샘플앱을 하나 만들고 있었는데, 

AndroidManifest.xml 내 아래 코드 처럼 다이나믹링크 관련 intent-filter를 적용하였더니 테스트 폰 홈에서 앱을 찾을 수 없는 현상이 발생하였습니다.

1
2
3
<data
    android:host="${link}"
    android:scheme="https" />
cs

아이러니하게도 링크를 통한 앱 실행은 문제가 없었습니다.

 

꽤 오랜시간 삽질을 하다가 혹시나 하는 마음에 다이나믹링크 관련 intent-filter와 launch관련 intent-filter를 분리해주었더니 해결할 수 있었습니다.

 

1
2
3
4
5
6
7
8
9
10
11
12
<intent-filter>
    <action android:name="android.intent.action.MAIN"/>
    <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<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:host="${link}"
        android:scheme="https" />
</intent-filter>
cs

 

 간단한 내용이지만 저처럼 삽질하시는 분들이 없길 바라는 마음에 포스팅합니다.