对于分析,我正在收集有关哪些URL / URI导致我的应用启动的数据。
当我检查意图和数据以确定启动它的URI时,使用:
getIntent().getData()
URI的格式通常为" custom:// 123456789" (许多不同的大数字出现)
我想了解是什么原因导致它以Uri格式启动,知道我是否可以安全地从统计数据中筛选出这些案例。
根据要求:以下是清单中的活动条目,其中包含从Launcher开始捕获或从我的域中点击URL的意图过滤器。
<activity
android:name=".ui.activity.MainActivity"
android:clearTaskOnLaunch="true"
android:configChanges="locale|orientation|keyboardHidden|screenSize"
android:label="@string/app_name"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<!-- Capture the opening of the app via a link to app.tuenti.com -->
<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:scheme="http" android:host="mydomain.com"/>
<data android:scheme="https" android:host="mydomain.com"/>
</intent-filter>
</activity>