0

I'm new to Xamarin Forms and I'm creating an app for Android that turns off WiFi automatically. The question: How can I use the WifiManager in Xamarin Forms ? In MainActivity.cs or somewhere else ?I could not find any good examples on the internet. Thank you

Yves
  • 201
  • 2
  • 9

1 Answers1

0

As Jason said, you could use the DependencyService.

For more details of the DependencyService, you could refer to the sample i done before. How to launch Android Settings app to your app's settings with Xamarin.Essentials Launcher?

Some usage of this need to request for the runtime permission, the code sample in the link below would be helpful for the runtime permission in Xamarin.forms. Xamarin - Requesting camera permissions in WebView

Wendy Zang - MSFT
  • 10,509
  • 1
  • 7
  • 17