我的应用程序旨在与各种亚马逊链接一起使用,但由于某种原因,它开始始终打开链接,而不是 Android 系统每次都询问。
如果我在 Chrome 中单击亚马逊网站上的链接,我的应用程序就会打开。如果我单击电子邮件中的亚马逊链接,我的应用程序就会打开。
在我的设置中,我将 Android 设置为每次都询问亚马逊(见屏幕截图),但它的行为就好像它被设置为默认值一样。
奇怪的是,我的应用程序过去并没有这样做,而且它现在有时不这样做(尽管只是偶尔),而是按照你的预期询问。但是 95% 的时间我的应用程序会自动启动。
现在我从用户那里得到同样的报告。
清单中的某些东西是否可能导致这种情况(我没想到会有效地允许应用劫持)或者我的操作系统设置(以及报告问题的用户的设置)是否搞砸了?
Manifest.xml 如下:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.nooriginalthought.amalfi">
<uses-permission android:name="android.permission.INTERNET"/>
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="AmALfi" android:largeHeap="true" android:resizeableActivity="true" android:supportsPictureInPicture="true" android:theme="@style/AppTheme">
<activity android:name="com.nooriginalthought.amalfi.MainActivity" android:configChanges="orientation|screenSize" android:screenOrientation="portrait" android:launchMode="singleTop" android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter android:label="@string/generate_affiliate_link_with_amalfi">
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain"/>
</intent-filter>
<intent-filter android:label="@string/generate_affiliate_link_with_amalfi">
<action android:name="android.intent.action.SENDTO"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:host="*.amazon.ae" android:scheme="http"/>
<data android:host="*.amazon.ae" android:scheme="https"/>
<data android:host="*.amazon.ca" android:scheme="http"/>
<data android:host="*.amazon.ca" android:scheme="https"/>
<data android:host="*.amazon.co.uk" android:scheme="http"/>
<data android:host="*.amazon.co.uk" android:scheme="https"/>
<data android:host="*.amazon.com" android:scheme="http"/>
<data android:host="*.amazon.com" android:scheme="https"/>
<data android:host="*.amazon.com.au" android:scheme="http"/>
<data android:host="*.amazon.com.au" android:scheme="https"/>
<data android:host="*.amazon.com.br" android:scheme="http"/>
<data android:host="*.amazon.com.br" android:scheme="https"/>
<data android:host="*.amazon.com.mx" android:scheme="http"/>
<data android:host="*.amazon.com.mx" android:scheme="https"/>
<data android:host="*.amazon.de" android:scheme="http"/>
<data android:host="*.amazon.de" android:scheme="https"/>
<data android:host="*.amazon.es" android:scheme="http"/>
<data android:host="*.amazon.es" android:scheme="https"/>
<data android:host="*.amazon.fr" android:scheme="http"/>
<data android:host="*.amazon.fr" android:scheme="https"/>
<data android:host="*.amazon.in" android:scheme="http"/>
<data android:host="*.amazon.in" android:scheme="https"/>
<data android:host="*.amazon.it" android:scheme="http"/>
<data android:host="*.amazon.it" android:scheme="https"/>
<data android:host="*.amazon.jp" android:scheme="http"/>
<data android:host="*.amazon.jp" android:scheme="https"/>
</intent-filter>
<intent-filter android:label="@string/generate_affiliate_link_with_amalfi">
<action android:name="android.intent.action.VIEW"/>
<data android:host="*.amazon.ae" android:scheme="http"/>
<data android:host="*.amazon.ae" android:scheme="https"/>
<data android:host="*.amazon.ca" android:scheme="http"/>
<data android:host="*.amazon.ca" android:scheme="https"/>
<data android:host="*.amazon.co.uk" android:scheme="http"/>
<data android:host="*.amazon.co.uk" android:scheme="https"/>
<data android:host="*.amazon.com" android:scheme="http"/>
<data android:host="*.amazon.com" android:scheme="https"/>
<data android:host="*.amazon.com.au" android:scheme="http"/>
<data android:host="*.amazon.com.au" android:scheme="https"/>
<data android:host="*.amazon.com.br" android:scheme="http"/>
<data android:host="*.amazon.com.br" android:scheme="https"/>
<data android:host="*.amazon.com.mx" android:scheme="http"/>
<data android:host="*.amazon.com.mx" android:scheme="https"/>
<data android:host="*.amazon.de" android:scheme="http"/>
<data android:host="*.amazon.de" android:scheme="https"/>
<data android:host="*.amazon.es" android:scheme="http"/>
<data android:host="*.amazon.es" android:scheme="https"/>
<data android:host="*.amazon.fr" android:scheme="http"/>
<data android:host="*.amazon.fr" android:scheme="https"/>
<data android:host="*.amazon.in" android:scheme="http"/>
<data android:host="*.amazon.in" android:scheme="https"/>
<data android:host="*.amazon.it" android:scheme="http"/>
<data android:host="*.amazon.it" android:scheme="https"/>
<data android:host="*.amazon.jp" android:scheme="http"/>
<data android:host="*.amazon.jp" android:scheme="https"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
</activity>
<activity android:name="com.nooriginalthought.amalfi.ManageAffIdsActivity" android:configChanges="orientation|screenSize" android:screenOrientation="portrait" android:theme="@style/AppTheme"/>
<activity android:name="com.nooriginalthought.amalfi.PreviewLinkActivity" android:configChanges="orientation|screenSize" android:screenOrientation="portrait"/>
</application>
</manifest>