Android 从深度链接检测打开的应用程序

Android 从深度链接检测打开的应用程序,android,android-activity,deep-linking,Android,Android Activity,Deep Linking,我正在使用fromdeep link连接我的应用程序。我怎样才能检测到我的应用程序已从深度链接或从应用程序图标打开?将要在深度链接中使用的URL放入manifest.xml筛选器中 <activity android:name="com.example.android.GizmosActivity" android:label="@string/title_gizmos" > <intent-filter android:label="@string/f

我正在使用from
deep link
连接我的应用程序。我怎样才能检测到我的应用程序已从
深度链接
或从应用程序图标打开?

将要在深度链接中使用的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>
在方法
onCreate(savedInstanceState:Bundle?)中
检查条件:

intent?.action == Intent.ACTION_VIEW && intent?.data != null

您能告诉我,有没有办法通过深度链接来识别哪个应用程序调用了我的应用程序。
intent?.action == Intent.ACTION_VIEW && intent?.data != null