In my previous blog post , i explained How to retreive the Battery Level programatically in Windows Phone 8 ?
In this blog post , i will explain how the Windows Phone developers could retreive the estimated or the remaining time of device battery programatically using C#.
How to retreive the Remaining time of the Windows Phone 8 device battery programatically using C# ?
The Battery class includes the property RemainingDischargeTime which is a read only property that gets the time left for the windows phone device battery to be fully discharged.
Get the access to the Battery instance with the Battery.GetDefault() and then use the property RemainingDischargeTime to retreive the time left.
public partial class MainPage : PhoneApplicationPage
// SK - To display the Remaining time
Note that when you use the the RemainingDischargeTime , it will show you a invalid remaining time but should work fine on the windows phone device.
In one of my previous blog post, I demonstrated how to get the current location in Windows Phone 8 using the Geolocator class. The Geolocator class allows the developers to ...READ MORE
In one of my previous blog post, I explained about the new feature in the Windows Phone 8 SDK - Graphical Manifest Designer that lets the developers to graphically edit ...READ MORE
The Navigation to different pages in Windows Phone is handled with the NavigationService Property defined in the PhoneApplicationPage class.
To perform an external Navigation , you should be using the HyperlinkButton ...READ MORE
The developers can make use of the SMSComposeTask launcher to send the SMS in Windows Phone 7 .
To send the SMS in Windows Phone 7 using SMSComposeTask by including the ...READ MORE
Nokia Expert Center is organizing a webinar on the topic "Company Apps for Nokia Lumia Windows Phone 8 phones" on April 17 2013 (Wednesday) at 8 AM (GMT+0) .
The Company ...READ MORE
With the Voice Command Definition (VCD) file, the developers can enable the feature in their app that lets the users to launch the app by tapping and holding the windows ...READ MORE
When a new Windows Phone project is created , the Visual Studio creates the App.xaml file along with the App.xaml.cs (code behind) file which is inherited from the System.Windows.Application class ...READ MORE
The Windows Phone project includes the WMAppManifest.xml, a XML file that contains the important Windows Phone app related information like the Capabilities that the application needs, Display Name, Supported resolutions, ...READ MORE
Good news for all the Windows Phone developers .
PhoneGap 2.3.0 is now released with full support for Windows Phone 8.
Steve Gill in the PhoneGap Blog announces the release of PhoneGap ...READ MORE
Taking Screen Shot in Windows Phone was one of the most wanted feature especially from the Bloggers.
One of the new features in Windows Phone 8 is the ability to take ...READ MORE
A new version of MJPEG Decoder version 1.2 was released few days back with the support for Windows Phone 8 and is now available for download from codeplex
What is MJPEG ...READ MORE
Data Binding is one of the important concept in Windows Phone 8. The Data Binding is generally done with the DataContext property which is part of the Framework Element.
Oxygene and ...READ MORE
The Windows Phone 8 SDK provides the MapsDirectionsTask launcher which allows the users to get the route or direction from the built-in maps application in windows phone 8.
To get the ...READ MORE
What engine does .NET for Windows Phone use?
The earlier version of the Windows Phone prior to Windows Phone 8 used the .NET Compact Framework.
The Windows Phone 8 uses CoreCLR .READ MORE
In one of my previous blog post, we learnt how to implement the speech recognition in Windows Phone 8 using the Built-in grammars and the List Grammars. This blog post ...READ MORE
The developers can make use of the MarketplaceSearchTask to search the Windows Phone Marketplace for a specific search keywords. Not just the apps, the MarketplaceSearchTask also lets the users to ...READ MORE
Oxygene and Windows Phone 8 tutorials - Article Index
The MapsTask launcher lets the users to launch the Maps application in Windows Phone 8.
How to use the MapsTask Launcher in Windows ...READ MORE
One of the popular online event "Jump Start" series is back and this time with the topic on Windows Phone 8.
The Windows Phone 8 Jump Start series is happening on ...READ MORE
Few days back, Google had announced the launch of the Google AdMob SDK beta for Windows Phone 8 which lets the windows phone 8 developers to monetize their app.
The Google ...READ MORE
There are times when the developer need to adjust the map control to suit the different conditions like day time or night time access. To achieve this, the Map Control ...READ MORE
Specifying the Accuracy when retrieving the Location in
How to Open the Application Manifest file for
How to Navigate from One Page to Another
How to send SMS in Windows Phone 7
Nokia Webinar: Company Apps for Nokia Lumia Windows
How to verify if the Voice Command Definition
App.XAML file in Windows Phone Project (C#)
Windows Phone 8 SDK Feature – Graphical Manifest
PhoneGap 2.3.0 with Windows Phone 8 Support Released
How to take Screen Shot in Windows Phone
MJPEG Decoder v1.2 with Windows Phone 8 support
Oxygene and WP8 – Binding Data in Windows
How to Display Directions via Built-in Maps in
Q&A #30 – What engine does .NET for
Speech Recognition in Windows Phone 8- SRGS Grammars
How to Search for Music in the Windows
Oxygene and WP8 – MapsTask Launcher
Building Apps for Windows Phone 8 Jump Start
Google AdMob SDK beta for Windows Phone 8
How to Adjust the Map Control for Low
Interesting Articles to Read
The following two tabs change content below.
Senthil Kumar is a Speaker , Blogger and Software Engineer from Bangalore. He is a Microsoft MVP in Client Development. He primarily works on .NET technologies like C# , ASP.NET MVC , Entity Framework , SQL Server etc. He is a Windows Phone Enthusiast and writes about Windows Phone and Mobile development at MobileOSGeek.com.