Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Plugin.Battery;
- using Xamarin.Forms;
- namespace BatteryStatusDemo
- {
- public partial class MainPage : ContentPage
- {
- public MainPage()
- {
- InitializeComponent();
- RemainingChargePercent.Text = "RemainingChargePercent: " + CrossBattery.Current.RemainingChargePercent + " %";
- Status.Text = "Status: " + CrossBattery.Current.Status;
- PowerSource.Text = "PowerSource: " + CrossBattery.Current.PowerSource;
- }
- }
- }
Add Comment
Please, Sign In to add comment