I had a service running in the background and the activity was not dying. When I opened my application again, it opened immediately as if the activity had not been recreated. At this point, the alert dialogs I had previously created remained with the old token. My problem was solved by setting all instances to null in the onDestroy method before the application was closed.