简体   繁体   English

如何从任何 web 浏览器打开 flutter 应用程序?

[英]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 这是我在这个平台上发现的

Short Answer简答

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.它会起作用。

More details更多细节

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>

refer this 参考这个

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在浏览器中打开 flutter web 应用程序,就像 html 文件一样 - How to open flutter web app in browser just like a html file 如何使用 flutter 应用程序中的应用内浏览器打开 Url? - How to open an Url using In-App Browser from a flutter application? Flutter 如何使用 web 浏览器打开 pdf - Flutter how to open pdf using web browser 如何在 Flutter Web 应用中打开 Viber 应用? - How to open Viber app in Flutter web app? 有没有办法在应用程序中打开 URL 而不是 flutter 中的浏览器? - Is there any way to open an URL inside app instead of browser in flutter? 为什么我的 Flutter web 应用调试在浏览器中打不开? - Why won't my Flutter web app debug open in the browser? 如何构建 FCM 推送通知以在 Flutter(Android 和 iOS)中的默认系统 Web 浏览器应用程序中打开指定的 URL - How to construct FCM push notification to open specified URL in default system web browser app in Flutter (Android & iOS) 创建一个按钮以从 flutter web 打开应用程序 - Create a button to open app from flutter web 如何收听 Flutter 应用内网页浏览器? - How to listen to the Flutter in-app web browser? 如何从我的 Flutter 代码打开 Web 浏览器 (URL)? - How do I open a web browser (URL) from my Flutter code?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM