c# - Run Windows Phone 8.1 RT app under lockscreen -
How can I create my Windows Phone 8.1 app to run under the lock screen such as I can use the following code by using Windows Can I Phone in Phone:
PhoneApplication Service. Present. Application idle datetime mode = disable identity mode. Disabled; PhoneApplicationFrame as rootfame = App.Current.RootVisual PhoneApplicationFrame; If (Rootframe! = Null) {rootfreem.obscqueued + = new event handler & lt; ObscuredEventArgs & gt; (Rootfreem_obscuser); RootFrame. Your School + = New Event Handler (Root Frame_Ansksk); }
I am working on the Windows Phone 8.1 Runtime (Store) app because the Silverlight type is not one, so it seems that the phone applications service is not part of this API, so the above The code will not work. Does anyone have the idea that what is suggested to do this in the Windows Phone 8.1?
PS If this is not possible because I am starting with fear then it is a matter, what are my alternate options?
updated
When the RT Windows Phone 8.1 app Is created, PhoneApplicationService
is no longer available (Silverlight is only available for Windows Phone 8.1 apps).
At this point, it does not seem that there is a direct replacement, but working class using the class.
OLD
If you double-check the documentation, you will see that it is still supported in Windows Phone 8.1.
I am feeling that you are creating a universal application and you are trying to put it in the code sharing project that is used by both Windows 8.1 and Windows Phone 8.1 projects. is done.
In that case, you must use supported preprocessor instructions to specify your preceding forums. Code:
#if WINDOWS_PHONE_APP PhoneApplicationService.Current.ApplicationIdleDetectionMode = IdleDetectionMode Disabled; // etc #endif
You can read more about how to share different bits of code in universal applications:
(Which means the above method Looks down on the article)
Comments
Post a Comment