xamarin - change a value in xamarin forms through a website
问题描述
I'm kind of new to Xamarin and I have a simple problem but no idea to how do that.
I have written an app with Xamarin forms. the problem is Here that I want user connect to my website do sth and then come back to the app. I need to change a Boolean in Xamarin to true when the task is done in website.
how I can get this information (just turn a false to true) from web? I have no idea so any help will appreciated.
解决方案
- 确定 JS 上的函数名称。
- 用于
webView.EvaluateJavascript("javascript: callJS();", new EvaluateBack());
获取对应方法的回调值。查看此链接以获取更多信息:如何在 Android 中运行 Java Script 函数并获得返回?
推荐阅读
- javascript - 如果数组中存在或不存在该值,我如何使用三元运算符对值进行真假
- javascript - 从数组javascript验证条件序列
- python - 创建字典的DataFrame时发生“ValueError”
- push-notification - 在 swift 4 中使用 FCM 未收到 PushNotification
- linux - 每当设备插入我的计算机时如何自动运行“sudo modprobe -r ftdi_sio”
- css - 为类添加css
- c# - 控件的 ASP.NET Core 条件验证
- firebase - Firebase Analytics 自定义事件参数报告有(未设置)
- unity3d - 虚拟现实 SDK Oculus 无法初始化
- sorting - 在 Solr 中对截断的日期进行排序