First to begin, there are already answered threads for this question. I have tried everything mentioned in
Android Notification restarts app but want to resume
Resume application and stack from notification
Notification to restore a task rather than a specific activity?
Open application after clicking on Notification
to mention a few.
My problem, when my android app is in background and i click on a notification, the app does not launch (i am using Unity), the app launches and it shows a blank screen. In the logs I see Unity is getting invoked and these are pretty much the last logs from unity
I/Unity ( 1196): onPause D/Unity ( 1196): Releasing Unity-ProjectRequestedWakeLock D/Unity ( 1196): Sensor : Accelerometer ( 1) ; 0.153229 / 0.01s ; BMA2x2 3-axis Accelerometer / Bosch
And i will have to close to app. From the next time, when the app is in background, on clicking on notification, the app launches. The logs are pretty much the same. I have used all the combination of Intent flags, mentioned above in the links, along with the changes to Manifest.xml.
Let me know if i am missing out something.