DrMoriarty / godot-local-notification

Godot module for local notifications (android and iOS)
MIT License
140 stars 24 forks source link

Request to add HTML5 notifications realisation #11

Closed ViRGiL175 closed 3 years ago

ViRGiL175 commented 3 years ago

Hello Mr. Moriarty!

Having used your wonderful library, we were very happy and then thought that with the same interface it is possible to show notifications in the browser too.

This PR contains the first working draft of our implementation. Unfortunately, we are not very familiar with NativeLib and the principles of your architecture and package distribution, but we tried to fit our changes as much as possible KISS-SRP-ETC with common sense and to be similar to your folder and code structure.

There is still a lot to develop here, and we only tested Chrome, but a start has been made. We hope you enjoy this idea and want to add these changes to your project in the future.

Co-Authored-By: tigz19 1655967+tigz19@users.noreply.github.com

DrMoriarty commented 3 years ago

@ViRGiL175 Very nice! Could you change res://html5-plugin to res://addons/localnotification-html5 ? I think it will be better not to make chaos in project root :-) I also tried to use some of plugins (firebase and amplitude) for html5 target. So I'm going to add html5 platform support to NativeLib.

ViRGiL175 commented 3 years ago

Could you change res://html5-plugin to res://addons/localnotification-html5 ?

Of course.

I also tried to use some of plugins (firebase and amplitude) for html5 target. So I'm going to add html5 platform support to NativeLib.

It would be great.

Also, it's very interesting to me why do you decide using Python to build/run NativeLib and not to using Godot itself?

Godot can do file system operations and can make REST requests, can parse JSON configs etc. And I think those Godot realization could be lighter than whole Python environment depending.

DrMoriarty commented 3 years ago

The main idea was to be able install all dependencies from command line (for example on build server) and not to heavy depends from godot version. You are right, pure gd implementation will be faster and more comfortable. I think that I will make it a little bit later.

ViRGiL175 commented 3 years ago

Thank you for your review, @DrMoriarty

Maybe you want to write some check-list of priority features we can also implement in this PR?

We want our HTML5 additions to be functional more or less like Android and iOS parts of this plugin. It should be not ersatz-notifications with limited functionality, but a full-featured web-alternative.

DrMoriarty commented 3 years ago

Hi @ViRGiL175 I think that we can add html5 functionality by small PRs so I don't want to make long check-lists. I merged this PR and I'm going to add to NativeLib more platforms support in near days. I will update this plugin when new platforms will be ready to test.

ViRGiL175 commented 3 years ago

OK, we will watch for your releases and make PRs if there will be good function additions for HTML5 part from our workflow.