Set a header in the webrequest Microsoft Maui WebView Control Android - webview

How can I set the header in the webrequest to a website In Maui (.Net 7) WebView Control Android
.SetHeader("?", value) type thing?
Thanks in advance
I've tried setting it via the navigation event but can't seem to find a function to set the header

There is no a such api can add a header into the webview's request in the maui. You need to use the android native code.
Refer to this case about how to update request header in WebView in the native android, you can use the android native WebViewCilent and override the shouldInterceptRequest or the shouldOverrideUrlLoading to add a header.
But there is a bug about Android WebViewClient's ShouldInterceptRequest is never called in MAUI WebView. The custom handler will not work until the bug has been fixed. You can follow up this issue on the github.
So you can try to use the custom renderer to do that, you can try the code in this answer about using the webvew custom renderer in the maui. I have tested it, but the webview will be blank in my device. It seems also a bug. But you can have a try.

Related

Unable to set cookie in WKWebView using "Set-Cookie in BlackBerry Dynamics app

After upgrading to BlackBerry Dynamics for iOS (v10.1.0.36) cookies that previously were being set via the "Set-Cookie" header in the responses are no longer being set.
On performing some analysis we have found out that the WebView receives the cookies in the response. However its not being set in the WebView and the javascript cannot read the set cookies in the WebView.
Even if we manually read the cookies from the Response and set them in the WebView the javascript is still unable to read the cookies.
We have also noticed that in the below mentioned Blog Post the very same issue we are facing is declared as fixed (in 10.1) so it has been a bit confusing how it is working in 10.0 but not in 10.1
https://devblog.blackberry.com/en/2022/01/blackberry-dynamics-sdk-v10-1-is-now-generally-available
Setting Cookies in the WKHTTPCookieStore was not supported in 10.0 as described below and its support was added in 10.1.
https://docs.blackberry.com/en/development-tools/blackberry-dynamics-sdk-ios/10_0/blackberry-dynamics-sdk-ios-devguide/gwj1489687014271/Requirements-and-prerequisites-for-iOS-platform-features/owv1529436593184/WKWebView-unsupported-methods-and-properties
Could you confirm if your app is using a native WKWebView directly or else? You can post some code snippets around the issue here or reach out to BlackBerry Support in case this is a defect in 10.1.
Thanks,

Destroy React Native Webview

I have a React Native application that uses a WebView to display a Highcharts chart. It was working for a while but out of nowhere it just stopped loading in Android. The only fix I could find was to disable Chrome and re-enable it. Which makes me believe there is something going on Chrome on my phone that's making it break. I see in the Android developer docs, the WebView has a destroy() function.
Is there a way I can call this function from my React Native app?
MMM the purpose of the question is unclear.
You don't want to display the webview ? don't display it , remove it from the render function.
You want to display the webview ? display it.
You want to have conditional rendering ? have it, it will destroy the webview or create a new one. There is a lot of posts of how to have conditional renderind in google.
My suggestion would be... update chrome. If it's already updated, go back to previous versions. If you have android 7+ i think you can change the webview provider in the developer options, if you can, change it to android system webview (you will need to manually install it from the play store). Don't use a native solution for personal device problems.

View set cookies of an iOS app?

I am trying to debug an iOS app without having the actual code.
It is using a ui web view, calling a website that sets cookies. I need to check which cookies are set. The problem does not appear in safari, only in the app, so I need to check the cookies of the app.
How can I do that? Is there a developer tool that can help me read the cookies similar to the safari web inspector?
Or do the developers have to use a certain framework to make the cookies readable?
Can I use xcode to debug an app - similar web inspector for safari - without having the code?
Thanks in advance for any hints.
This is kind of an old question but nevertheless relevant. So for the sake of posterity here's is how to connect an iOS mobile device to an OSX device to view web inspector.
https://appletoolbox.com/use-web-inspector-debug-mobile-safari/

How can I use device gestures in Oracle MAF application?

I want to use phone shake gesture in my oracle mobile app. I found an artical related to Oracle MAF device gestures here:
https://wikis.oracle.com/display/ADFMobileDesign/Pattern+-+Device+Gestures
But didn't found any example that how can we use this in mobile app. If anyone has implemented this before, please share. Thanks.
Added a custom cordova shake plugin to my MAF application and invoke it from javascript file which was included on application home page feature. You can get cordova plugin and its usage techniques from here:
https://github.com/leecrossley/cordova-plugin-shake
This video helped me use the Swype in my application :
https://www.youtube.com/watch?v=TbFwiXSayUM
add tag to view tag:
<amx:view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:amx="http://xmlns.oracle.com/adf/mf/amx"
xmlns:dvtm="http://xmlns.oracle.com/adf/mf/amx/dvt">
<amx:navigationDragBehavior action="volver" direction="back" id="ndb1"/>
and add action on navigation action on taskflow
<control-flow-case id="__4">
<from-outcome>volverInicio</from-outcome>
<to-activity-id>taskFlowReturn1</to-activity-id>
<transition>slideRight</transition>
</control-flow-case>

qooxdoo mobile - click handlers not firing in ios

I have a mobile app built using phonegap +qx mobile 3.5.
I have a page implemented using qooxdoo mobile which has a header implemented using qooxdoo controls. The content section of the page is loading from an external system using a ajax call which returns a string(html+css). The html has built in click handlers which are not firing on ios. The html works fine when loaded directly without qx.
This is an existing app in android and seems to work fine there. Can someone help me get this working on ios?
EDIT : I am using native scroll and not the custom scroll plugin.
I believe this problem is caused by the used scrolling method.
If you just remove the macro "qx.mobile.nativescroll" out of your config.json,
qx.Mobile detects itself whether to use NativeScroll or iScroll.
In version 3.5 that means, Windows Phone 8 and iOS7 are using the native scrolling.
Do not forget to rebuild after removal.

Resources