title: Iphone 4 sdk - How can I find out if applicationWillEnterForeground was triggered due to a notification?
body: <p>I am using the notification system as an alerting mechanism. If the app is off or in the background, the iphone alerts the user when a notification comes in. If the app is running and in the foreground I want to show the same alert view as if it was off. I cannot get this to work for the case where the app transitions from the background to the foreground. I end up seeing the alert twice if the the transition was due to a notification, or once if the user clicked the launch icon.</p>
  
  <p>Is there any way to know whether the transition was due to a notification of due to the user clicking the launch icon?</p>
  
  <p>Thanks.</p>