question

previousversiondocs-2345 avatar image
0 Votes"
previousversiondocs-2345 asked WenyanZhang-MSFT commented

Xamarin forms open browser and get Response data

I want to open a website in my app to make the user log in to a specific page (so he can trust that it's the real website), if the login succeeds, there is data in the response which I need for my application. Is there a way to get the response data from the xamarin webview or browser or something else?

dotnet-xamarin
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

May I know if you have got any chance to check my answer? I am glad to help if you have any other questions.

0 Votes 0 ·

1 Answer

WenyanZhang-MSFT avatar image
0 Votes"
WenyanZhang-MSFT answered WenyanZhang-MSFT edited

Hello,
Welcome to our Microsoft Q&A platform!

As you said “open a website in my app to make the user log in to a specific page”, I recommend you to use Xamarin.Essentials: Web Authenticator,this often means enabling your users to sign in their existing Microsoft, Facebook, Google, and now Apple Sign In accounts.

If you want to get the return value of web, invoking a JavaScript function in C # may be a good choice. It need to be handled in Javascript code on the web page side, this requires you know about Javascript. For more infor information, you can refer to
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/webview?tabs=windows#invoking-javascript

Best Regards,
Wenyan Zhang


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.