localNotification problem

HI
 

    A ) open the app and set notification id then exit app;

    B ) open again the app, How to get notification id in  A ) step!?

   There is no way!?

    every time open app, run system.cancelNotification()!

    but if  exit app then again run app, the code( system.cancelNotification() ) is not cancel notification!?

Thank you!