简体   繁体   中英

Reading Data From a BackGround Task (Windows Phone)

I need to know how I should represent accelerometer data retrieved by a background task in the UI. Is data binding an option? Can I do it the same way that I would with the code-behind pages of the UI? Can I access a variable from the background task page from another C# page (mainpage.xaml.cs for example)?

Also I need to know the way the accelerometer data is captured and provided to the developer. For example is it in terms of Gs or is just raw values and If it is a raw value, how would I convert that to a value in terms of Gs.

I'm developing for Windows Phone 8.1 using C#.

Any help would be appreciated.

Thank You

Take a look at this sample code from MSDN which runs audio files in a Background task. http://code.msdn.microsoft.com/windowsapps/BackgroundAudio-63bbc319

This will give you a clear idea on how to pass data from foreground task to background task and vice versa.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM