Android Firebase cloud messaging handling multiple notification
<p>I'm using new Firebase Cloud Messaging and sending messages from server including both notification and dat. I have following questions about that:</p>

<ol>
<li><p>onMessageReceived is not called when app is in background and
notification created so how i can detect that notification and get
its data without waiting for user to click and get data from intent.</p></li>
<li><p>I have set "click_action" in notification to launch activity when notification called but it will recreate activity even if it is already running how avoid that?</p></li>
</ol>