Share via

Background UWP App using Phoneline.Dial not working under Locked Screen

Peace Man 1 Reputation point
2020-08-31T03:12:22.383+00:00

I used PhoneCallManager to dial a phone number which works great if I use DisplayRequest.Active to keep the App TopMost and Screen Un-Locked.

But If I do not use DisplayRequest.Active to prevent Screen Lock then the phone call is not placed despite the fact the Background Task is executing the code.

Is there a way to Un-Lock Screen from Background. Is there any way to place a call from Background Task when Screen is Locked.

I am using Visual Studio 2017...

Thanks

Developer technologies | Universal Windows Platform (UWP)
0 comments No comments

1 answer

Sort by: Most helpful
  1. Richard Zhang-MSFT 6,936 Reputation points Microsoft Employee Moderator
    2020-08-31T08:01:20.41+00:00

    Hello,

    Welcome to Microsoft Q&A.

    According to the document content of PhoneLine.Dial:

    The caller must be in the foreground.

    This means that your app must be in the foreground when this method is called. The application is not in the foreground when the screen is locked, so this method will not work.

    In addition, If the application is a lock screen application (such as an application customized for Kiosk mode), the application can request the user to unlock through the LockApplicationHost.RequestUnlock method.

    Thanks.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.