Coder Social home page Coder Social logo

unclenight / waydroid-notificator Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 3 KB

A simple Flask-based app to display notifications forwarded by [Notifikator app](https://github.com/koro666/notifikator) as Sailfish OS notification pop-ups

License: MIT License

Python 83.61% Shell 16.39%

waydroid-notificator's Introduction

Waydroid Notificator

A simple Flask-based app to display notifications forwarded by Notifikator app as Linux notification pop-ups via DBus. Meant to run as a SystemD service (from user) with gunicorn.

Notifikator needs to be configured to forward notification data as JSON to http://<waydroid-bridge-ip>:8000 - most likely, this will be 192.168.240.1. As a security precaution, run.sh script detects Waydroid bridge IP to bind gunicorn to it - thus, port 8000 is only open to requests from Waydroid.

Installation

The app is very raw at this stage and does not have an RPM package. The installation process is manual and is focused on getting the things done ASAP.

Copy the app contents into /opt (or clone the repo as /opt/waydroid-notificator), install Python dependencies (preferably, system-wide so the paths are available to SystemD), register the SystemD service and run it.

Commands run on a Sailfish OS:

cd /opt/waydroid-notificator
devel-su pip install -r requirements.txt
cp waydroid-notificator.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable waydroid-notificator
systemctl --user start waydroid-notificator

At this point, the app should run as a SystemD-managed daemon and listen on 192.168.240.1:8000.

In Waydroid:

  • install Notifikator app
  • allow Notifikator to intercept system notifications
  • set URL to http://192.168.240.1:8000 (IP can change depending on your Waydroid setup!)
  • set Protocol to JSON
  • do not enable authentication

You can test the notifications now using the dedicated button in Notifikator.

Known Issues

  • v1.1 of Notifikator app does not include application name in the JSON data. master branch of the repo contains all the fix already, there's just no built .apk file to download. Flask app was designed with v1.1 in mind (at least until I rebuild the Notificator) so it displays Waydroid as application name for every notification
  • some Android applications duplicate the same notification multiple times when a long-running process with a progress bar is executed (Waydroid backup, Seedvault, is a good example - it sends about ten notifications at once). The app does not handle these as the same notification currently, so you'll be spammed every time such an event happens in Waydroid.

License

waydroid-notificator's People

Contributors

unclenight avatar

Stargazers

Lynix avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.