How do I get a toggle button to turn on/off push notifications in an app built in

So I am working in right now and I am trying to mess with push notifications. I want the users of the app I am building to be able to go to the settings page and toggle on and off push notifications. I have looked at a bunch of different methods to try and get this to work but none of them are very descriptive. If anyone can share any help it would be greatly appreciated.
2 people have
this question