location and camera permission issues on xamarin forms while using webview #24422
Unanswered
soykanozcelik
asked this question in
General
Replies: 1 comment 1 reply
-
Xamarin Forms and WebForms! Are you living in the past? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
I've had trouble with location and permission issues on Xamarin forms while using WebView control.
i've a small project with Xamarin forms which has 2 XAML pages and one of displaying my responsive asp net webform application via WebView control.
app first check if eg firmName preference is exist if not
asking firm nickname and accept it and set it preferences_set way (via xamarin essentials) then populate webview.source eg "https://aaa.bb/login.aspx?fid=" + firmName + "?per&did=7d82ae35-4937-40b2-8c9d-a60b8020043f";
after loading webview content there is several javascript functions one for qrcode reading which using zxing library on the default page (eg. default.aspx)
library can access camera sources but when I click button start scan button i getting an error message that "please grant location permission" but both of permissions already granted on Android settings and also chrome browser
Normally web apps run well on mobile browsers and desktop browsers after accepting permissions but when i run the app from apk through webview i am getting that above message.
I've tried several techniques with AI support but I couldn't success :/
i am sending my android project and also javascript codes that on the related aspx page
1- would you like to check my project and javascript codes and modify its to run properly
2- if Xamarin forms are not possible to resolve my problem and require under maui would you like to create and adapt my codes on it? maui cross platform or separately Android WebView and iOS WebView via Blazor
NOT : you can test the WebView permission issue under WebView at https://xsentius.net/zxing-camera.html
and also see the full html and javascript codes at https://github.com/zxing-js/library/blob/master/docs/examples/qr-camera/index.html
Any help, suggestions will be very appreciated
CozbimPermobil.zip
jsCodes.txt
Beta Was this translation helpful? Give feedback.
All reactions