locked
Setting Lockscreen Image from Background Task not possible?

    Question

  • Hi There,

    i`m trying to set the Lockscreen Images from a Background Task. In my App i have the "Windows.System.UserProfile.Lockscreen" Class to do it. But in my Background Solution the Lockscreen Class is not available!?!?!

    is there a workaround? or is it impossible?

    Greetings,

    Flo

    Saturday, October 18, 2014 11:14 AM

Answers

  • Sorry I cannot think of other possibilities to suggest you.

    I can show you my screenshot, I was able to use Windows.System.UserProfile.Lockscreen in my Runtime Component:

    Could you share what you have done with us?

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by x-M4nTis-x Thursday, November 20, 2014 11:12 AM
    Tuesday, November 18, 2014 9:53 AM
    Moderator

All replies

  • Hi Flo,

    Can you show us your code? How did you set it via your background task?

    SetImageFileAsync/SetImageStreamAsync seems to be the correct API.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Monday, October 20, 2014 5:49 AM
    Moderator
  • Hi Jamles,

    thanks for the reply. but the problem is, that in my background task, there is no "Lockscreen" Class in the windows.system.userprofile Namespace!!! But why?!?

    In my app i`m using windows.system.userprofile.Lockscreen.SetImageFileAsync(). 

    Monday, October 20, 2014 9:43 AM
  • How could it be? Are you working for Windows Store App or Windows Phone? See the requirement section of this API:

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, October 21, 2014 1:42 AM
    Moderator
  • Hi James,

    i`m working for a Windows Store App! In my App-Solution it works perfectly, but in my BackgroundTask-Project the "Windows.System.UserProfile.Lockscreen"-Class is not available! 

    Greetings, 

    Florian

    Monday, November 10, 2014 12:44 PM
  • How do you create your backgroundTask project, is it a Windows Runtime Component or simply a DLL?

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, November 11, 2014 6:01 AM
    Moderator
  • yes, as a Windows Runtime Component!
    Wednesday, November 12, 2014 2:09 PM
  • Sorry I cannot think of other possibilities to suggest you.

    I can show you my screenshot, I was able to use Windows.System.UserProfile.Lockscreen in my Runtime Component:

    Could you share what you have done with us?

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by x-M4nTis-x Thursday, November 20, 2014 11:12 AM
    Tuesday, November 18, 2014 9:53 AM
    Moderator
  • Hi James!

    okay, i deleted my Background Task and added a new Project "Win Runtime Component" to my solution....now i can access the lockscreen class!!!!! o_O o_O o_O

    i don`t know why or what was wrong! Thank you very much for your help and time!!! :)

    Greetings, 

    happy florian ^^

    Thursday, November 20, 2014 11:11 AM