- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我们有一个 android 应用程序,我们想在其中打开一个 url。为了避免用户重新输入用户名和密码,我们想传递 session cookie。我们可以在我们的应用程序中使用 webview 来执行此操作,但我们希望避免使用 webview。
我们找到的另一个解决方案是使用 chrome 自定义选项卡。根据文档 https://developer.chrome.com/multidevice/android/customtabs chrome 自定义标签支持:
Shared Cookie Jar and permissions model so users don't have to log in to sites they are already connected to, or re-grant permissions they have already granted.
我正在尝试来自 https://github.com/GoogleChrome/custom-tabs-client 的示例但我无法弄清楚如何传递 session 数据。
任何人都可以通过指向文档或实现此目标的方法来帮助我吗?
最佳答案
Shared cookie jar 是指 Custom Tab 与 Chrome 共享 cookie jar。从今天开始,无法从自定义选项卡内的应用程序设置 cookie。
另一方面,您可能需要检查 Smart Lock for Passwords ,它支持跨应用程序和网站自动登录(并将在自定义选项卡内工作)
关于android - 如何在 chrome 自定义选项卡 android 中共享 cookie 数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32268158/
我是一名优秀的程序员,十分优秀!