gpt4 book ai didi

javascript - 其他页面上的 PhoneGap URL 方案不起作用

转载 作者:行者123 更新时间:2023-11-29 16:00:11 25 4
gpt4 key购买 nike

您好,我有这个简单的应用程序,我使用 myapp:// 打开应用程序我的 ANDROID 应用程序这个工作文件但是当我使用 myapp://index.html 打开一个页面它不起作用我搜索了互联网但我找不到解决方案任何人都可以告诉我我想在我的应用程序中打开一个特定的页面因为 TWITTER 不支持 myapp:// 仅当有任何扩展名如 myapp://index.html

时才支持

或者如果这是不可能的,为什么我可以在从我的 TWITTER 应用程序登录后将用户重定向到 url myapp://

谢谢穆罕默德·泽山

最佳答案

您还可以将 http 方案作为具有监听器 Activity 的站点来监听。类似于这段代码。

<activity android:label="@string/app_name" android:name="com.foursquare.robin.BrowsableActivity">
<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="http" android:host="example.com" android:pathPrefix="/" />
<data android:scheme="https" android:host="example.com" android:pathPrefix="/" />
</intent-filter>
</activity>

当任何平台将您的应用重新路由到您的方案时,将很快被撤销。

关于javascript - 其他页面上的 PhoneGap URL 方案不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25139888/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com