Azure-docs: Xamarin.Forms Support

Created on 9 Jun 2020  Â·  13Comments  Â·  Source: MicrosoftDocs/azure-docs

I just went through the Azure Creator documentation and I can see that it can only be used with a Web SDK as of now. I would like to use the same with Xamarin.Forms and want to know if you will be extending this particular feature to it?

That would mean that AzureMaps SDK should be available for Xamarin.Forms in the first place.

Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri1 azure-mapsvc cxp product-feedback triaged

All 13 comments

@Druffl3 Looks like similar feedback has been provided on the UserVoice: https://feedback.azure.com/forums/909172-azure-maps/suggestions/40083277-azure-maps-sdk-to-integrate-in-xamarin-forms I would suggest you provide your feedback and upvote it.

I am inquiring into this.

hey @AshokPeddakotla-MSFT I have added my feedback there and also here:
https://feedback.azure.com/forums/909172-azure-maps/suggestions/38373853-xamarin-forms-support

@anastasia-ms Do you have any further updates or are we good to close this issue?

Go ahead and close. I reached out to the pm, but didn’t receive a response.

Wait, can we know if it is at least planned for in future?

I will ping him again.

Hello. Thank you for your patience. I apologize for the difficulties.

Here is the answer:

Xamarin forms won’t be supported for a while. Before that can be supported, the indoor maps functionality needs to be added to our mobile SDKs first, and then we can create Xamarin bindings on top of that. I would say we are at least a year out from that. That said, it should be possible to use the web SDK within Xamarin forms by embedding it within a web view control. https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/webview

Thank you for the response @anastasia-ms . Here's to hoping for a xamarin.forms support and a nice use-case satisfaction with Web View controller.

We will now proceed to close this thread. If there are further questions regarding this matter, please tag me or @AshokPeddakotla-MSFT in your reply. We will gladly continue the discussion and we will reopen the issue.

@asergaz , I created an HTML page as directed here and hosted it in my Azure static website portal. It works well on a browser
But, once I consume the same URL in Xamarin.Forms webView, nothing loads and I get these error messages:

[chromium] [ERROR:context_group.cc(146)] ContextResult::kFatalFailure: WebGL1 blacklisted
[chromium] [INFO:CONSOLE(2509)] "Error: Failed to initialize WebGL", source: https://azuremaptrial.z22.web.core.windows.net/atlas.min.js (2509)
[EGL_emulation] eglMakeCurrent: 0xc972e800: ver 3 0 (tinfo 0xc5ef28b0)
[chromium] [ERROR:context_group.cc(146)] ContextResult::kFatalFailure: WebGL1 blacklisted
[EGL_emulation] eglMakeCurrent: 0xc972e800: ver 3 0 (tinfo 0xc5ef28b0)
[chromium] [ERROR:context_group.cc(146)] ContextResult::kFatalFailure: WebGL1 blacklisted
[EGL_emulation] eglMakeCurrent: 0xc972e800: ver 3 0 (tinfo 0xc5ef28b0)
[chromium] [ERROR:context_group.cc(146)] ContextResult::kFatalFailure: WebGL1 blacklisted
[EGL_emulation] eglMakeCurrent: 0xc972e800: ver 3 0 (tinfo 0xc5ef28b0)
[chromium] [ERROR:context_group.cc(146)] ContextResult::kFatalFailure: WebGL1 blacklisted
[chromium] [INFO:CONSOLE(2509)] "Uncaught Error: Failed to initialize WebGL.", source: https://azuremaptrial.z22.web.core.windows.net/atlas.min.js (2509)

Have you tried loading the webview form on another device platform? It looks like WebGl1 is blacklisted on the device platform you are using. To enable support try this:

https://stackoverflow.com/questions/53598522/how-do-i-enable-webgl-in-xamarin-forms-webview-on-uwp

@anastasia-ms , the link you have shared helps fix the issue in UWP, which I hadn't tried at that time. The log I have shared is actually from an android pixel emulator. According to https://developer.chrome.com/multidevice/webview/overview , WebGL is supported from WebView v36 in chromium. Hence, updating chromium lets the WebView render WebGL. According to this answer: https://stackoverflow.com/a/30916299 , we can find out if the browser will support WebGl by checking the
reset notification strategy field
If it is 0x8252, then it is enabled, else if it is 0x0000, then it is disabled.

This field is set to 0x0000 in my emulator.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JeffLoo-ong picture JeffLoo-ong  Â·  3Comments

bityob picture bityob  Â·  3Comments

Favna picture Favna  Â·  3Comments

bdcoder2 picture bdcoder2  Â·  3Comments

AronT-TLV picture AronT-TLV  Â·  3Comments