android - 将外部 html 文件重定向到 Phonegap index.html

标签 android ios cordova

我想在我的 PhoneGap 应用中使用外部服务。 当该过程完成时,外部服务使用成功 URL 将用户重定向到原始页面。 我应该将什么 URL 传递给服务才能返回我的 PhoneGap 应用程序? 我试过 Android 设备中的 window.location = 'file:///android_asset/www/index.html'。但它不起作用。

有谁知道如何使这个调用起作用?任何帮助,将不胜感激。谢谢。

最佳答案

location 不要在这里使用。

所以你需要调用InAppBrowser在 phonegap 中调用外部页面。当您关闭应用程序浏览器时获得成功。

如果InAppBrowser浏览器不方便就用ChildBrowser用于显示外部网页的插件。它比 InAppBrowser 好

关于android - 将外部 html 文件重定向到 Phonegap index.html,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23657165/

相关文章:

android - 如何为 Activity 切换主题

android - 如何在android中使用XML布局在 ImageView 中为图像制作圆角

ios - Xcode 6错误 'URLWithString'不可用?

android - LocalStorage 与 Phonegap 不持久

android - 从 ionic 生成非调试 apk

android - react-native android url 图像不显示

java - 没有为 LoginRequest 调用 responseListener (Android) (Java) (php)

iOS 和 Google Firebase - 如何执行通知操作

ios - AFNetworking 从响应中删除字符

javascript - 使用 Paypal Cordova 插件,无法使用生产或沙盒模式使其工作