안드로이드 앱 링크
Overview
Branch를 사용하면 Android 앱 링크가 크게 향상되고 간단하게 활성화할 수 있습니다. 그뿐만 아니라 완전한 어트리뷰션을 제공받고 Android 앱 링크가 실패하는 에지 케이스(edge case)를 서포트 받을 수 있으며 유저가 앱을 설치하지 않은 경우에는 딥링크(Deep Link) 허용도 가능합니다. Android 앱 링크는 안드로이드 6 이상에서만 작동합니다. 나머지는 Branch가 해결해드립니다!
Setup
1. 서명 인증서 핑거프린트 생성하기
- Start by generating a SHA256 fingerprint of your app's signing certificate.
a. Navigate to your keystore file. This is the file that you use to build the debug and production version of your APK file before deploying it.
b. Run this command to generate the fingerprint:keytool -list -v -keystore xxxx-example-my-release-key.keystore
다. 그 결과
14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5
와 같은 값이 나타납니다. 해당 내용을 복사하십시오. - Now, you’ll enable app links on the Branch dashboard by doing the following:
a. Head to the Configuration page on the Branch dashboard.
b. Toggle the Enable App Links checkbox in the Android section.
c. Paste the copied fingerprint value into the SHA256 Cert Fingerprints field that appears. You can insert both your debug and production fingerprints for testing. Simply separate them with a comma.
d. Scroll down and click Save. - Now, add your Intent Filter to Manifest by going to the Link Domain section on the Configuration page.
a. Copy your domain name.
b. Choose theActivity
you want to open up when a link is clicked. This is typically yourSplashActivity
or aBaseActivity
that all other activities inherit from (and likely the same one you selected in the SDK integration guide.
c. Inside yourAndroidManifest.xml
, locate where the selectedActivity
is defined.
d. Within theActivity
definition, insert the intent filter provided below (making sure thatxxxx
matches the subdomain prefix you've been assigned or selected for yourself). Add this as its own separate intent filter.
e. If you use a custom domain or subdomain for your Branch links, you should also add an entry for:
<data android:scheme="https" android:host="mycustomdomainorsubdomain" />
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="xxxx.app.link" />
<data android:scheme="https" android:host="xxxx-alternate.app.link" />
<data android:scheme="https" android:host="xxxx.test-app.link" />
<data android:scheme="https" android:host="xxxx-alternate.test-app.link" />
</intent-filter>
도메인 유효성 검증
The system must be able to verify every host specified in a URL intent filters’ data elements against the Digital Asset Links files hosted on the respective web domains. If any verification fails, the app is not verified to be a default handler for any of the URL patterns defined in the app's intent filters. You can use Google's Statement List Asset Generator to test your existing statement file.
2. APK SHA256 핑거프린트 가져오기
- Run:
keytool -printcert -jarfile my_app.apk
on your APK file.
Updated 4 months ago