0

github 프로젝트 다음에 딥/다이나믹 링크를 만듭니다.전체/동적 링크가 검색/수신되지 않는 이유는 무엇입니까?

: 이것은 내 응용 프로그램의 AndroidManifest.xml 파일에 정의 된 intent-filters입니다

private void shareDeepLink(String deepLink) { 
      Intent intent = new Intent(Intent.ACTION_SEND); 
      intent.setType("text/plain"); 
      intent.putExtra(Intent.EXTRA_SUBJECT, "Firebase Deep Link"); 
      intent.putExtra(Intent.EXTRA_TEXT, deepLink); 

      itemView.getContext().startActivity(intent); 
} 

: https://appcode.app.goo.gl/?link=http://example.com/-example&apn=com.abc.xxx&amv=16&ad=0&extraParameter=null

이 내가 그것을 공유하기 위해 사용하고 방법은 다음과 같습니다

가 만들어지고 링크의
<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="example.com" android:scheme="http"/> 
     <data android:host="example.com" android:scheme="https"/> 
</intent-filter> 

공유하는 방법은 다음과 같습니다. deep-link :

boolean autoLaunchDeepLink = false; 
     AppInvite.AppInviteApi.getInvitation(mGoogleApiClient, this, autoLaunchDeepLink) 
       .setResultCallback(
         new ResultCallback<AppInviteInvitationResult>() { 
          @Override 
          public void onResult(@NonNull AppInviteInvitationResult result) { 
           if (result.getStatus().isSuccess()) { 
            // Extract deep link from Intent 
            Intent intent = result.getInvitationIntent(); 
            final String deepLink = AppInviteReferral.getDeepLink(intent); 
            Log.d("deepLinkMainActivity", deepLink); 

           } else { 
            Log.d("getInvitation", "getInvitation: no deep link found."); 
           } 
          } 
         }); 

여기에 로그 아웃지고 무엇을 (받은 딥 링크) : http://example.com/-example 당신은 분명히 볼 수 있듯이

, 나는 생성 된 정확한 딥 링크를받지 못했습니다 대신 나는 그것의지고있어 변경된 버전. 왜?

은 어떻게 생성되고 공유 된 동일한 딥 링크를 얻을 수 있습니까? 앱 패키지 이름은, 정보가

을 열어야 응용 프로그램, 예를 들어 알 : 당신은 딥 링크를 기기 수령하는

+0

와 함께 할 당신 말은 그 라인 'Log.d ("deepLinkMainActivity", 딥 링크);' 'http://example.com/-example'을 출력합니까? 나는 그것이 당신이 제공 한 링크로 기대해야 할 것이라고 생각합니다. 당신은 무엇을 보길 기대합니까? – diidu

+0

의도 필터가 스키마 "https"를 정의하지만 링크에 "http"를 사용합니다. 그것은 문제를 일으킬 수있는 한 가지입니다. – diidu

+0

@diidu이 모든 것을 보길 원합니다 :'https : //appcode.app.goo.gl/? link = http : // example.com/-example & apn = com.abc.xxx & amv = 16 & ad = 0 & extraParameter = null' –

답변

1

제대로

이 전체 링크가이 APN과 같은 정보가 포함되어 생성 https://appcode.app.goo.gl/?link=http://example.com/-example&apn=com.abc.xxx&amv=16&ad=0&extraParameter=null

이것은 귀하의 링크입니다 링크 = http://example.com/-example입니다. 따라서 더 많은 매개 변수를 추가하려는 경우 아래 예와 같이 여기서 할 수 있습니다.

link = http://example.com/-example&blabla. 이 부분은 당신이 시도하고 알려 수

http://example.com/-example&blabla을 인코딩 할 수 있습니다 원하는 경우

그래서 당신은 결과 https://appcode.app.goo.gl/?link=http://example.com/-example&blabla&apn=com.abc.xxx&amv=16&ad=0

로이 있습니다.

당신은 대체 여기 https://firebase.google.com/docs/dynamic-links/android

+1

내가 말한대로 더 많은 매개 변수를 추가했습니다. 이제 링크를 받았을 때 어떻게 검색 할 수 있습니까? –

+0

사실 'AppInvite.AppInviteApi.getInvitation'을 호출 할 때 딥 링크에서 추가 매개 변수를 보았습니까? 그렇다면 구문 분석을 사용하여 매개 변수를 가져올 수 있습니다. 아마도 "&"의 분할을 가져올 수 있습니다. 지금 나는 Branchio를 사용하고 있기 때문에 예제가 없다. –

+0

당신이 여기서 말한 것을 이해할 수 없습니다.^ –

0

이 정보를 참조 할 수 있습니다

<data 
     android:host="xxx.abc.com" 
     android:scheme="https"/> 

<data 
     android:host="example.com" 
     android:scheme="http"/> 
+0

http 또는 https –

+1

을 사용할 때 아무런 문제가 없습니다. 호스트 이름 문제가 있어야합니다. –

관련 문제