OneSignal / OneSignal-Flutter-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your flutter app with OneSignal
https://www.onesignal.com
Other
625 stars 214 forks source link

[question]: Replacement for "OneSignal.shared.userProvidedPrivacyConsent" in v5 #831

Closed TheMeanCanEHdian closed 9 months ago

TheMeanCanEHdian commented 9 months ago

How can we help?

I use OneSignal.shared.userProvidedPrivacyConsent in my app to check consent has been provided by the user. I am not seeing a comparable feature in v5. Is there a way to accomplish this?

Code of Conduct

emawby commented 9 months ago

Hello the methods are consentRequired()/consentGiven(). https://github.com/OneSignal/OneSignal-Flutter-SDK/blob/user_model/main/MIGRATION_GUIDE.md#onesignal

TheMeanCanEHdian commented 9 months ago

Hello the methods are consentRequired()/consentGiven(). https://github.com/OneSignal/OneSignal-Flutter-SDK/blob/user_model/main/MIGRATION_GUIDE.md#onesignal

Hi @emawby,

Those methods allow you to set if consent is needed and given, but I do not see a way to query for the current state. That is what userProvidedPrivacyConsent does. This doesn't solve my issue unless I am missing some detail.

nan-li commented 9 months ago

Hi @TheMeanCanEHdian,

There is no getter for the equivalent of userProvidedPrivacyConsent. Since this value is set by app developers, it should be kept and managed by them. Is there a use case that you need OneSignal to store the value?

TheMeanCanEHdian commented 9 months ago

Hi @TheMeanCanEHdian,

There is no getter for the equivalent of userProvidedPrivacyConsent. Since this value is set by app developers, it should be kept and managed by them. Is there a use case that you need OneSignal to store the value?

Historically I have had an issue where it sometimes seemed OneSignal would lose that consent was granted. I am cross-referencing this state with a locally store value to correct the mismatch when it would occur.

I'll move forward without that, and if I have any similar issues will surface them with a bug report.

Thank you for the clarification.