AndreMiras / EtherollApp

Provably fair dice game running on the Ethereum blockchain
MIT License
57 stars 22 forks source link

Re-roll from notification #110

Open AndreMiras opened 6 years ago

AndreMiras commented 6 years ago

On roll result notification it would be great to have a button to roll again on same parameters.

AndreMiras commented 5 years ago

In Android, this seems possible via the addAction() method. This method must be called on the Notification object created by the Notification-Builder. Adding custom actons is not currently available in plyer, since the notification facade doesn't provide such an interface (of "complex" widgets with callbacks).

So to bring it (to Android at least) we may need to override/customize our own notification to change the one provided in plyer/platforms/android/notification.py. Maybe it's possible to monkey patch the NOTIFICATIONBUILDER to hack the addAction() in without overriding the plyer android notification code completely.

For info, here is Android notification buttons implemented in Kivy https://github.com/Bakterija/android-notification-buttons

Since this is not trivial to have it properly implemented cross-platform, we may keep it for later.