0
내 응용 프로그램에 deep link
에서 사용하고 있습니다. 내 앱이 deep link
양식이나 애플리케이션 아이콘에서 열렸 음을 어떻게 감지합니까?딥 링크에서 열린 응용 프로그램 감지 - Android
내 응용 프로그램에 deep link
에서 사용하고 있습니다. 내 앱이 deep link
양식이나 애플리케이션 아이콘에서 열렸 음을 어떻게 감지합니까?딥 링크에서 열린 응용 프로그램 감지 - Android
딥 링크에서 사용하려는 URL에 대한 manifest.xml 필터를 삽입하십시오. 활동 내부
<activity
android:name="com.example.android.GizmosActivity"
android:label="@string/title_gizmos" >
<intent-filter android:label="@string/filter_view_http_gizmos">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "http://www.example.com/gizmos” -->
<data android:scheme="http"
android:host="www.example.com"
android:pathPrefix="/gizmos" />
<!-- note that the leading "/" is required for pathPrefix-->
</intent-filter>
<intent-filter android:label="@string/filter_view_example_gizmos">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "example://gizmos” -->
<data android:scheme="example"
android:host="gizmos" />
</intent-filter>
</activity>
,이 같은 데이터를 확인할 수 있습니다
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Intent intent = getIntent();
String action = intent.getAction();
// using action u can detect
Uri data = intent.getData();
}