Cancellation Of All Activities

How can I cancel all the activities that are running in the application after clicking a button?

A post was merged into an existing topic: Close All Types Of Notifications