8

Access Battery and Energy Saver Information with Xamarin.Essentials

 3 years ago
source link: https://www.youtube.com/watch?v=D1O_xkNgBXU
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Access Battery and Energy Saver Information with Xamarin.Essentials

192 views
β€’Dec 21, 2020

1.99K subscribers

If you're using background tasks like data transfer or heavy on the animations, then this video might be for you. A great optimalization might be to check the battery status. Is energy saving on? The battery level low? Maybe pause those transfers or stop those animations! In this video we will see how to access that data through the Xamarin.Essentials Battery APIs for our Xamarin.Forms application.

πŸ’ Join this channel to get access to perks: https://www.youtube.com/channel/UCBBZ...

πŸ›‘ Don't forget to subscribe to my channel for more cool content: https://www.youtube.com/GeraldVerslui...

🐦 Follow me on Twitter: https://twitter.com/jfversluis

πŸ”— Links Sample code repo: https://github.com/jfversluis/XFEBatt...

Xamarin Essentials Repo: https://github.com/xamarin/Essentials Xamarin.Essentials Battery Docs: https://docs.microsoft.com/xamarin/es...

⏱ Timestamps 0:00 Intro 0:36 Sample App Outline 1:27 Important Note On Emulators 1:43 Implement Android Permission 2:36 Implement Some Sample UI 3:00 Implement Code-Behind Code 3:20 Explore Battery APIs 4:30 Get Battery Charge Level Code 5:20 Get Energy Saver Status 7:08 Implement BatteryInfoChanged Event 8:25 Running the Sample Code 10:35 Outro

πŸŽ₯ Video edited with Camtasia (ref): https://techsmith.z6rjha.net/AJoeD

πŸ™‹β€β™‚οΈ Also find my... Blog: https://blog.verslu.is Twitch: https://twitch.tv/jfversluis All the rest: https://jfversluis.dev


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK