How to differentiate Alice notification
Vayth opened this issue · 3 comments
Is your feature request related to a problem? Please describe.
I'm using flutter_local_notification
already, and it seems to override Alice's internal flutter_local_notification
.
I'm using the payload to decide where the navigator will push. The problem is I need to differentiate whether I clicked on Alice's notification or my own notification.
At the moment, I'm using a check on the payload: if it's an empty string (which Alice use), I will call showInspector
.
However, I don't believe empty string is an ideal way to use it as differentiator.
Describe the solution you'd like
Use something specific for payload (e.g. "alice"
), or maybe we can add custom payload for Alice to send in Alice's constructor
Don't use notifications to access Alice (showNotification = false in Alice's constructor). You can use shake-to-open feature or call showInspector() somewhere from debug screen from your app.
I've used both Alice and local notifications in my apps and everything was fine (I was using showNotifications = false).
What if I have another feature that is using shake already?
My use-case is only for some network test /quality control stuff before production, it's on another branch that won't be included in final apk, but I think it would be good to have a way to have an option for this.
Then simply call showInspector() manually. https://github.com/jhomlala/alice#show-inspector-manually
The best way in my opinion is some debug menu which will be enabled based on flavors (i.e. test flavor). Simply use showInspector anywhere you want.