2017-05-06 5 views
0

우리는 Android SDK에 지사 SDK를 통합했습니다. 다음은 매니페스트 세부 정보입니다. 작동하지 않는 시나리오는 다음Branch.io 링크가 앱에서 작동하지 않습니다.

Branch branch = Branch.getInstance(); 
     branch.initSession(new Branch.BranchReferralInitListener() { 
      @Override 
      public void onInitFinished(JSONObject referringParams, BranchError error) { 
       if (error == null) { 
        // params are the deep linked params associated with the link that the user clicked before showing up 
        Log.i("BranchConfigTest", "deep link data: " + referringParams.toString()); 

     }, this.getIntent().getData(), this); 

을 다음과 같이

<intent-filter> 
      <data 
       android:host="open" 
       android:scheme="example" /> 
      <data 
       android:host="bnc.lt" 
       android:scheme="https" /> 

      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
      <category android:name="android.intent.category.BROWSABLE" /> 
     </intent-filter> 

초기화 코드 조각입니다.

1. 앱에서 분기 링크를 클릭하면 위 코드 조각의 referralParams가 비어 있습니다. 링크가 앱 외부에있는 경우 referralParams의 JSON String을 올바른 방식으로 수신 할 수 있습니다.

문제를 파악할 수 없습니다.

답변

1

여기에서 지점에서 Alex : 이것은입니다. Google의 연결 인프라는 동일한 앱 내부에서 열린 링크를 처리하도록 설계되지 않았으므로 불행히도이 특정 구현을 지원할 수 없습니다.

+0

안녕하세요. 알렉스, 해결 방법을 제안 하시겠습니까? Google은 일반적으로 콘텐츠를 직접 볼 수 있도록 앱 내에서 콘텐츠에 대한 지원 링크를 사용자에게 보냅니다. – karan

+0

내가 알고있는 것은 아니지만 새로운 개발이 있는지 Android 엔지니어링 팀에 확인해 보겠습니다. –

1

알렉스의 대답은 현재의 공식 답변입니다! 여기 비추천 된 'shouldOverrideUrlLoading'을 사용하여 제공되는 비공식 비공식 해결 방법이 있습니다. webview 클라이언트를 재정 의하여 분기 별 링크를 처리 한 다음 HTTPS API를 사용하여 세션을 재설정하거나 다른 응용 프로그램을 열거 나 닫지 않고 링크 데이터를 가져올 수 있습니다. 이 데이터가 있으면 렌더링하십시오.

공공 부울 shouldOverrideUrlLoading (웹보기 :

웹뷰 객체로 설정

private static final String BRANCH_DOMAIN = "yourdomain.app.link"; 
  1. 는 웹보기 클라이언트를 만들기 해결에 응용 프로그램, 해결 방법, 강조 내에서 웹뷰 내에서 링크 데이터를 얻기 view, String url) { if (url.contains (BRANCH_DOMAIN)) { // 데이터를로드하고 엔드 포인트에 도달 -> 데이터로드 } else { view.loadUrl (url); } return true; }

    코멘트 위 정보를 입력하는 엔드 포인트를 공격하는 방법
  2. -https://github.com/BranchMetrics/branch-deep-linking-public-api#endpoint-3

예 : 말림 "https://api.branch.io/v1/url?url=URL_ENCODED_URL_TO_FETCH&branch_key= ..."

^나는이 존재에 대한 강조를 강조 할 수 방금 지원 한 지원되지 않는 방법이므로 작업을 중단하거나 이상적인 것이 아닌 경우 창의적인 솔루션을 제안하려는 경우 내 눈/담당자에게 손을 뻗지 마십시오!