title: (Windows 10) Handle incoming phone call in uwp application
body: <p>I need to do some task when the phone has the incoming phone call, but currently, I can not.</p>
  
  <p>I have read sample about background task to be triggered when an unrecognized incoming call arrives at this link <a href="https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/CallerID" rel="nofollow">CallerID</a>, and I have tried it, but my background task has not received anything.</p>
  
  <p>Here is register background task code:</p>
  
  <pre><code>private async void RegisterTask()
      {
          string phoneObsName = "phoneObsName";
          var access = await BackgroundExecutionManager.RequestAccessAsync();
          if (access != BackgroundAccessStatus.Denied &amp;&amp;
              access != BackgroundAccessStatus.Unspecified)
          {
              // Create a new background task builder.
              BackgroundTaskBuilder taskBuilder = new BackgroundTaskBuilder();
  
              // Create a new Phone Trigger.
              PhoneTrigger trigger = new PhoneTrigger(PhoneTriggerType.CallOriginDataRequest, false);
  
              // Associate the phone trigger with the background task builder.
              taskBuilder.SetTrigger(trigger);
  
              // Specify the background task to run when the trigger fires.
              taskBuilder.TaskEntryPoint = typeof(BackgroundStuff.PhoneCallBackgroundTask).ToString(); ;
  
              // Name the background task.
              taskBuilder.Name = phoneObsName;
  
              // Register the background task.
              BackgroundTaskRegistration taskRegistration = taskBuilder.Register();
  
              //UpdateBackgroundTaskUIState(true);
              //rootPage.NotifyUser("Registered Caller ID background task", NotifyType.StatusMessage);
          }
          else
          {
              //rootPage.NotifyUser("Background agent access denied", NotifyType.ErrorMessage);
          }
      }
  </code></pre>
  
  <p>Please help me to fix my issue.</p>