ExtensibilityApp class in WP 8.1 Silverlight

Search This thread

-W_O_L_F-

Senior Member
Jul 10, 2010
1,030
941
Moscow
There were some questions from developers, why they only see screenshot, and not their lockscreen.
Without
Code:
CacheMode="BitmapCache"
controls are NOT visible!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Hi all,

    If you've read the text that USED to exist here before, scratch that. Big Thanks to @Sunius1 for clarifying what I thought was a win. Due to this, I DID find something interesting in regards to the ExtensibilityApp class (Windows.Phone.System.LockscreenExtensibility.ExtensibilityApp). I happened to also find a hidden capability "ID_CAP_SHELL_DEVICE_LOCK_UI_API" (Seems to be a locked CAP because it only works on Emulator. I get a deployment error on my if I try including this capability). I suspected that these two worked together, but I wanted to make sure of this.

    Before we get started, read through the documentation from this site: http://msdn.microsoft.com/en-us/lib...lockscreenextensibility.extensibilityapp.aspx.

    We have the following methods:
    • BeginUnlock
    • EndUnlock
    • GetLockPinpadHeight
    • IsLockScreenApplicationRegistered
    • IsSystemOverlayApplicationRegistered
    • RaiseToastNotifications
    • RegisterLockScreenApplication
    • RegisterSystemOverlayApplication
    • UnregisterLockScreenApplication
    • UnregisterSystemOverlayApplication


    EDIT: After the release of the Live Lock Screen app, my speculations about the ID_SHELL_CAP_DEVICE_UI_API capability and the ExtensibilityApp object were correct. Thanks to @jessenic for finding out a good bit of info on this with me.

    It seems that in order to get this working, we have to add an Extension to the WMAppManifest.xml

    <Extension ExtensionName="LockScreen_Application" ConsumerID="XXXXX" TaskID="_default" ExtraFile="Extensions\\LockAppExtension.xml" />

    In the LockAppExtension.xml:

    <?xml version="1.0"?>
    <x:Extension xmlns:x="urn:LockApp">
    <AppID>AppNameForLockScreen</AppID>

    </x:Extension>



    As usual, Microsoft doesn't really give us much in terms of documentation.. Probably because it isn't meant to be used by the normal developer Confirmed: For now we have to actually ask for permission in order to use the cap. As to whether we'll get that granted? Who knows....

    All of these methods have no parameters at all, but I can almost guarantee this has to do with having an application that can control the lock screen.

    This thread will be for efforts in breaking this open and seeing whether we can create lockscreen applications..


    Homebrew Lockscreen Apps:
    4
    That is true. Sort of of a side question though, has anyone made a OEM account and looked over the API documentation there? There maybe some useful things we could learn about WP and maybe further a jailbreak for all WP devices....
    API isn't much useful as long as you cant really use most of functions due to policies.
    3
    I suppose we can only speculate how it works at this point, but if I had to guess, it goes like this:

    1. You have 2 projects in your LockScreenApp solution, one for the application to register the lockscreen, and the second one for the actual lock screen application.
    2. The former would use ExtensibilityApp APIs to register the the second one, coupled with the manifests so it's all "valid".
    3. The second application is just a another app that is able to process input and draw whatever it wants on the screen. That would explain why there's a delay at it starting when you press lock screen button while the phone is sleeping (probably it's a time for .NET to startup? Direct3D app should be able to start much faster).

    Although this is only speculation, I think this makes sense, because that's how background tasks work on Windows, at least. I wonder though, why Microsoft is not releasing the APIs to be used in public - are they afraid somebody will make a lockscreen application that will drain the battery fast or something?
    3
    Updated first post with some more data since the Live Lockscreen App debuted yesterday. There's more I didn't get into, but I want others to dig in and find out :)
    1
    There are actually two Windows.winmd files in Windows Phone SDK, one for Silverlight 8.1 apps and one for Jupiter 8.1 phone apps (located in C:\Program Files (x86)\Windows Phone Silverlight Kits\8.1\ and C:\Program Files (x86)\Windows Phone Kits\8.1\). There's only one the phone. And some APIs support only one app type (it's phone limitation it seems: faking .winmd file results in Platform::InvalidOperationException, saying you cannot use that API from this app type). That explains why the one on the phone has more APIs available than either of for single app type.

    As for LockscreenExtensibility - it's documented, just not available for Jupiter apps:

    http://msdn.microsoft.com/en-us/lib...ows.phone.system.lockscreenextensibility.aspx