Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable/enable notification #485

Closed
manuTro opened this issue Jul 24, 2017 · 14 comments
Closed

Disable/enable notification #485

manuTro opened this issue Jul 24, 2017 · 14 comments
Labels

Comments

@manuTro
Copy link

manuTro commented Jul 24, 2017

Is it possible to disable and enable notification?

@elios264
Copy link

elios264 commented Apr 9, 2018

any news on this?

I would love to disable when the user log out and reenable them when log in

@kyaroru
Copy link

kyaroru commented May 15, 2018

yes it is possible now on this commit of our forked repo : surialabs@39d7adb

For Android & iOS

  • To enable, fire requestPermissions(), and to disabled fire abandonPermission()

@wiliam-toney
Copy link

wiliam-toney commented Apr 4, 2019

abandonePermissions method don't block the remote notification on Android. What should I do to block the remote notification in a specific page?

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label May 26, 2020
@gluons
Copy link

gluons commented May 26, 2020

@github-actions Don't close.
I want to know how to disable remote notification. (like Daniels' question)
I use this local notification with React Native Firebase.

@Dallas62
Copy link
Collaborator

From README:

Abandon Permissions

PushNotification.abandonPermissions() Revokes the current token and unregister for all remote notifications received via APNS or FCM.

@gluons
Copy link

gluons commented May 26, 2020

abandonePermissions method don't block the remote notification on Android.

As @danielsgit said. It seems abandonPermissions may not disable remote notification on Android.

It shows duplicate notifications on my device. (I use local notification.)

@Dallas62
Copy link
Collaborator

Yeah, this was true last year
Look at #1425

@RyanCao7
Copy link

Abandoning and then re-registering for notifications is a truly hacky workaround to being able to intercept push notifications before they are displayed on the device. There ought to be a handler which fires before a notification ever reaches the device, and allows for re-routing (or simply not displaying) that particular notification. Any chance we can get this going?

@jimzqw
Copy link

jimzqw commented Aug 20, 2021

I also need this. How do we manage notifications by having a way to disable and re-enable? I was following the doc and tried cancelLocalNotification but got _reactnativepushnotification.default.cancellocalnotification is not a function

@oguzhannkayaa
Copy link

oguzhannkayaa commented Sep 4, 2021

@jimzqw did you find any solution for your question? Because I am also stuck on this problem. I opened an issue about this but they deleted my issue. It is really funny and annoying

@waqaramjad
Copy link

is there any update ?

@aristotles
Copy link

This still is an issue.

@jimzqw
Copy link

jimzqw commented Jan 20, 2022

My solution for now is unsub and resub based on your needs. Like if I don't want users to get notification on a certain page I will unsubscribe user, and resubscribe when they exit that page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests