[英]How to open flutter app from any web browser?
i know we can open android app using Android Deep Links and produce result as we want.我知道我们可以使用Android 深层链接打开 android 应用程序并生成我们想要的结果。 But is there a way to open flutter app from web browser?但是有没有办法从 web 浏览器打开 flutter 应用程序? this is what that i found at this platform 这是我在这个平台上发现的
You can't call the deep link URL from the web browser's search bar.您无法从 web 浏览器的搜索栏调用深层链接 URL。 First, you need to create an HTML page.首先,您需要创建一个 HTML 页面。 Then you can click the link.然后你可以点击链接。 It will work.它会起作用。
In my case, I created an HTML file with a deep link and send it to my email.就我而言,我创建了一个带有深层链接的 HTML 文件,并将其发送到我的 email。
HTML file HTML 档案
<a href="myapp://test">Open my app</a>
AndroidManifest.xml AndroidManifest.xml
<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="test"
android:scheme="myapp" />
</intent-filter>
For the Flutter app, permissions are configured in exactly the same way, as the corresponding native configurations.对于 Flutter 应用程序,权限的配置方式与相应的原生配置完全相同。 Android :安卓 :
<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="poc"
android:host="deeplink.flutter.dev" />
</intent-filter>
IOS: IOS:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>deeplink.flutter.dev</string>
<key>CFBundleURLSchemes</key>
<array>
<string>poc</string>
</array>
</dict>
</array>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.