title: Firebase notifications on Android phone with screen lock
body: <p>We develop an android app to show Firebase notification to user. The implementation is working very well in emulator everything is works fine, no problem.</p>
  
  <ul>
  <li>When install the app to my phone:
  
  <ul>
  <li>When the phone is unlocked, app is foreground: Message arrived, works fine</li>
  <li>When the phone is unlocked, app is background: Message arrived, works fine</li>
  <li>When the phone is unlocked, app is destroyed: Message arrived, works fine</li>
  <li>When the phone is locked, I hear the sound of message arrived, but I can't unlock the phone! I press the power button, and nothing happening. The phone is not responding since 5-10 seconds! After that time, the screen is on but I can't do anything on it. I can't turn off the phone, can't restart. The only way to unlock is start camera by pressing twice the power button, after a few seconds the camera is showing than I can swipe out the notification. After that everything is going well with the phone.</li>
  </ul></li>
  </ul>
  
  <p>My code is similar which is on firebase site: <a href="https://firebase.google.com/docs/cloud-messaging/android/client" rel="nofollow noreferrer">https://firebase.google.com/docs/cloud-messaging/android/client</a>.</p>
  
  <p>What should I do?</p>
  
  <p>Thanks</p>