How can I make my Windows Phone 8.1 app continue to run under the lockscreen like I can in Windows Phone 8 using the following code:
PhoneApplicationService.Current.ApplicationIdleDetectionMode = IdleDetectionMode.Disabled;
PhoneApplicationFrame rootFrame = App.Current.RootVisual as PhoneApplicationFrame;
if (rootFrame != null)
{
rootFrame.Obscured += new EventHandler<ObscuredEventArgs>(rootFrame_Obscured);
rootFrame.Unobscured += new EventHandler(rootFrame_Unobscured);
}
I am working on a Windows Phone 8.1 runtime (store) app as in not the Silverlight type one so for a start it seems that PhoneApplicationService is not part of this API so the above code will not work. Does anyone have an idea what the recommended way of doing this in Windows Phone 8.1 is?
PS. If this is not possible as I am beginning to dread is the case, what are my alternative options?