Android 如何在没有任何方案的应用程序中打开URL?
我正在创建一个Android应用程序,我应该在其中打开所有web链接。以下是我需要打开的示例web链接:Android 如何在没有任何方案的应用程序中打开URL?,android,Android,我正在创建一个Android应用程序,我应该在其中打开所有web链接。以下是我需要打开的示例web链接: www.google.com <intent-filter> <action android:name="DeepLinkOpen"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter>
- www.google.com
<intent-filter> <action android:name="DeepLinkOpen"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> <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="*" android:pathPattern="/.*" android:scheme="http" /> <data android:host="*" android:pathPattern="/.*" android:scheme="https" /> </intent-filter> </activity>
请尝试此
。这不是url。它是一个主机名。请尝试将android:pathPattern=“/.*”替换为android:pathPattern=“.\\\…”,但如何打开第三个url?
<data android:host="*" android:pathPattern="/.*" android:scheme="*" />