VUE应用程序的Android意图

发布于 2025-02-13 13:24:22 字数 177 浏览 0 评论 0原文

如何从vue-web-app中发送Android意图?

例如,启动外部应用以扫描条形码并返回条形码号码。

我有一个在浏览器环境中运行的VUE Web应用程序,我想启动一个本机Android应用以扫描条形码。如何从此Vue-Web-App中发送“ Android意图”以实现这一目标?例如,我需要一个特定的插件吗?

How can I send an android intent from a vue-web-app?

For example to start an external app to scan a barcode and return the barcode number.

I have a vue web app which runs in a browser environment and I want to start a native android app to scan a barcode. How can I send an "android intent" from this vue-web-app to achieve this? Do I need a specific plugin for example?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苍白女子 2025-02-20 13:24:22

您要启动的应用程序需要在意图过滤器中定义自定义URL方案。在这种情况下,您将有一个像这样的URI:demoapp:// scan?type = 128

当您的Vue应用程序将其重定向到这样的URI时,请在Android电话(安装了应用程序)将启动意图并启动随着相应活动的启动。

The app you're trying to start needs to have a custom URL scheme defined in the intent filter. In that case you'll have an URI looking like this: demoapp://scan?type=128

When your Vue app redirects to an URI like this on an Android phone (with the app installed) it will pick up the intent and launch the app with corresponding activity started.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文