title: How to keep application working under screenlock?
body: <p>I am writing a WP7 application which requires to play music even when screen lock is activated. I have done the following:</p>
  
  <pre><code>PhoneApplicationService.Current.ApplicationIdleDetectionMode = 
                                                  IdleDetectionMode.Disabled;
  </code></pre>
  
  <p>and am also implementing the events as follows :</p>
  
  <pre><code>void RootFrame_Obscured(Object sender, ObscuredEventArgs e)
  {
      _playunderLock = true;
  }
  
  void RootFrame_Unobscured(object sender, EventArgs e)
  {
      _playunderLock = false;
  }
  </code></pre>
  
  <p>But my music still stops when the lock button is explicitly pressed!</p>
  
  <p>Am I missing something??
  Also when music is playing the default lock screen does not get activated now, even though I haven't called  </p>
  
  <pre><code>PhoneApplicationService.Current.UserIdleDetectionMode = 
                                     IdleDetectionMode.Disabled;
  </code></pre>