title: Firebase Android foreground/background questions
body: <p>I am new to both firebase and android and I am trying to include real-time chat in my app. But I am having the following doubts regarding firebase. Please help.</p>
  
  <p>1) If the app is in foreground, will there be a default notification in the system tray or do I have to create one in onMessageReceived?</p>
  
  <p>2) If the app is in background, will onMessageReceived get called?</p>
  
  <p>3) If app is in background and onMessageReceived is not called, then the only way to get data is from the activity that is launched when the user clicks on the notification.
           a) What if the user doesn't click on the notification and dismisses it? How will I get the data then?
           b) Is there a way to control which activity will get called when the notification is clicked?</p>
  
  <p>4)If the app is in background and onMessageReceived does get called, then what is the point of getting the data from the intent extras of the activity that is lauched?</p>