Xamarin.forms: [Enhancement] Use Launcher.OpenUri in new project instead of Device.OpenUri(Deprecated)

Created on 18 Nov 2019  Â·  1Comment  Â·  Source: xamarin/Xamarin.Forms

Summary

After starting a Master Detail Page app with .netstandard 2.1, the console outputs that Device.OpenUri(Xamarin.Forms) is deprecated and says that we should use Launcher.OpenUri(Xamarin.Essentials) instead.

API Changes

Instead of creating Device.OpenUri when a new project is started, it should automatically create a Launcher.OpenAsUri call instead.

Intended Use Case

This should remove the deprecated warning and there goes -1 warning, and it is deprecated for a reason.

image

templates proposal-open enhancement âž•

Most helpful comment

Hi @DouglasMarq, you're absolutely right!

Unfortunately, the templates is not something we control. We did however already open an issue with them when we did this change. I have just checked just now, and a fix for this is already merged so this should disappear automatically in the near future whenever Visual Studio is updated.

I will close this for now since it's technically already fixed. If you have any more questions please let us know. Thanks!

>All comments

Hi @DouglasMarq, you're absolutely right!

Unfortunately, the templates is not something we control. We did however already open an issue with them when we did this change. I have just checked just now, and a fix for this is already merged so this should disappear automatically in the near future whenever Visual Studio is updated.

I will close this for now since it's technically already fixed. If you have any more questions please let us know. Thanks!

Was this page helpful?
0 / 5 - 0 ratings