Giter Site home page Giter Site logo

pipup's Introduction

PiPup

PiPup is an application that allows displaying user-defined custom notifications on Android TV.

The most common use-case for this application is for sending notifications, from a home-automation solution, to your Android TV.

Some example scenarios:

  • Show a snapshot of your camera on your TV (eg on a motion trigger)
  • Display a notification with the video of your camera when someone is at your door
  • Send a notification when your dryer/washingmachine is ready
  • Anything else you might find useful

The application is currently in a public beta

To enter the beta and install the application on your device go to:
https://play.google.com/apps/testing/nl.rogro82.pipup

Important: after installation / updating it is currently advised to restart your TV and open the application once to make sure the background-service is running

Sideloading:

On Android TV (8.0+), when sideloading, you will need to set the permission for SYSTEM_ALERT_WINDOW manually (using adb) as there is no interface on Android TV to do this.

To give the application the required permission to draw overlays you will need to run:

adb shell appops set nl.rogro82.pipup SYSTEM_ALERT_WINDOW allow

Integrating

PiPup uses an embedded webserver (NanoHTTPD) which runs on port 7979.

Sending notifications

To send notifications with an external media resource (image, url or webview) use application/json

Property Value
Path: /notify
Method: POST
Content-Type: application/json

Example json data:

{
  "duration": 30,
  "position": 0,
  "title": "Your awesome title",
  "titleColor": "#0066cc",
  "titleSize": 20,
  "message": "What ever you want to say... do it here...",
  "messageColor": "#000000",
  "messageSize": 14,
  "backgroundColor": "#ffffff",
  "media": { "image": {
    "uri": "https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/cfcc3137009463.5731d08bd66a1.png", "width": 480
  }}
}

All fields are optional and for media you can specify 3 types:

{ "image": { "uri": "address_to_your_image", "width": 480 }}
{ "video": { "uri": "address_to_your_video", "width": 480 }}
{ "web":   { "uri": "address_to_your_resource", "width": 640, "height": 480 }}

To send notifications with an image file use multipart/form-data

Property Value
Path: /notify
Method: POST
Content-Type: multipart/form-data

Form-fields:

Field Type
duration Integer (default=30)
position Integer (0..4, default=0)
title String
titleSize Integer (default=16)
titleColor string (default=#FFFFFF, format=[AA]RRGGBB
message String
messageSize Integer (default=12)
messageColor String (default=#FFFFFF, format=[AA]RRGGBB
backgroundColor String (default=#CC000000, format=[AA]RRGGBB
image File
imageWidth Integer (default=480)

position is an enum ranging from 0 to 4

Position
0 TopRight
1 TopLeft
2 BottomRight
3 BottomLeft
4 Center

Color-properties are in [AA]RRGGBB where the alpha channel is optional e.g. #FFFFFF or #CCFFFFFF

pipup's People

Contributors

rogro82 avatar michelfr avatar begner avatar madjam002 avatar xbmcnut avatar

Stargazers

Chris avatar Patrick Toft Steffensen avatar

Watchers

James Cloos avatar Patrick Toft Steffensen 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.