Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

windows lock/unlock (register/unregister bgtask) not working as expected #10

@ipetkov88

Description

@ipetkov88

I want to unlock a windows computer using an android device that has been paired via Bluetooth. I have a UWP app running on the desktop and a Java Android app running on the Android device. The Bluetooth connection is fine and can send data from the Android app to the desktop.
The issue is when I register the background task when the desktop PC is locked (received an "unlock" command from android device) I need to press the "space" key or some other key on the keyboard to unlock the PC using the companion device, it waits on Stage = WaitingForUserConfirmation and loops over it each 20 seconds.
Another issue I am observing is that if I lock the PC (unregister the background task), then I press "space" and lock screen is stacked on sign in option and I can choose if I want between companion device, pin and password for another option to sign in to the Windows. But the issue is when I send an "unlock" command from android device and register the background task, after that even I press "space" nothing happens - the option are two:

  • I need to wait around 20 second and windows unlocking it goes through all the stages of authorization
  • or I need to change the sign in option to another one (pin or password) and then return to companion device and windows unlock immediately.
    Actually both scenarios are not a good approach.

However looking through the documentation for the Framework, it is not clear to me at exactly what point in the workflow the Bluetooth connection should be made and the authorization attempted.
Please advice how to proceed, what I am doing wrong or how I can resolve some of the issues above?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions