locked
How to get Lockscreen image ? the example only shows how to sets it.

    Question

  • How to get Lockscreen image ? the example only shows how to sets it.
    Sunday, August 26, 2012 6:53 AM

Answers

  • You can only get programmatic access to a limited set of know locations such as the Pictures library (if you have enabled this in the manifest).  If the picture is stored elsewhere (like in the example you are describing) you will be denied access.  This is by design.

    -Jeff


    Jeff Sanders (MSFT)

    Monday, August 27, 2012 12:37 PM
    Moderator

All replies

  • var oriImage = Windows.System.UserProfile.LockScreen.OriginalImageFile;
    
    /* This works, but only if the picture that the user
     used is not Pictures that Microsoft provides on the "PC Settings" only works for images that the user store on his/her Hard drive, Picture library ?????
    */
    
    Windows.Storage.StorageFile.getFileFromPathAsync(oriImage.rawUri).then(function(file){
    
    })
    
    

    the problem is when I create a StorageFile object using the lockscreen rawuri property, it works. But when the picture is using Microsoft pictures. I can't create the StorageFile because it says "the access is denied", I tried giving my app permission to the picture library, it still does not work.

    Sunday, August 26, 2012 11:51 PM
  • You can only get programmatic access to a limited set of know locations such as the Pictures library (if you have enabled this in the manifest).  If the picture is stored elsewhere (like in the example you are describing) you will be denied access.  This is by design.

    -Jeff


    Jeff Sanders (MSFT)

    Monday, August 27, 2012 12:37 PM
    Moderator