All Projects → sqall01 → lightweight-push-pip

sqall01 / lightweight-push-pip

Licence: MIT license
A lightweight way to push messages to Android devices (pip library package).

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to lightweight-push-pip

Annictroid
Unofficial Annict client app for Android.
Stars: ✭ 20 (+42.86%)
Mutual labels:  android-application
etebase-java
A Java/Android client library for Etebase
Stars: ✭ 46 (+228.57%)
Mutual labels:  end-to-end-encryption
Take-Notes
Huge Assignments to Write with only a little time in Hand?
Stars: ✭ 17 (+21.43%)
Mutual labels:  android-application
Extract-Color-Palette-Api
Create gradient drawable by extracting prominent colors from image⚫⚪
Stars: ✭ 16 (+14.29%)
Mutual labels:  android-application
Paper
A minimal notes application in Jetpack Compose with MVVM architecture. Built with components like DataStore, Coroutines, ViewModel, LiveData, Room, Navigation-Compose, Coil, koin etc.
Stars: ✭ 122 (+771.43%)
Mutual labels:  android-application
ClipboardCleaner
Check and clean your clipboard using service, widget, shortcut and quick setting tile.
Stars: ✭ 85 (+507.14%)
Mutual labels:  android-application
Floral
Minimal design gallery app for Android.
Stars: ✭ 23 (+64.29%)
Mutual labels:  android-application
BatteryTool
Automatically stop apps running in the background. Free, no ads and open source.
Stars: ✭ 48 (+242.86%)
Mutual labels:  android-application
USBHIDTerminal
USBHIDTerminal
Stars: ✭ 102 (+628.57%)
Mutual labels:  android-application
piping-vnc-web
VNC over pure HTTPS via Piping Server on Web browser
Stars: ✭ 57 (+307.14%)
Mutual labels:  end-to-end-encryption
Nimbus
Official Android Application for Nimbus 2k18
Stars: ✭ 24 (+71.43%)
Mutual labels:  android-application
bloom-legacy
End-to-end encrypted Notes, Files, Calendar, Contacts... for Android, IOS, Linux & MacOS - DEPRECATED
Stars: ✭ 44 (+214.29%)
Mutual labels:  end-to-end-encryption
hermes-core
Security framework for building multi-user end-to-end encrypted data storage and sharing/processing with zero leakage risks from storage and transport infrastructure.
Stars: ✭ 72 (+414.29%)
Mutual labels:  end-to-end-encryption
EverTranslator
Translate text anytime and everywhere, even you are gaming!
Stars: ✭ 59 (+321.43%)
Mutual labels:  android-application
Awesome-Flutter-Templates
A Huge Collection of Flutter App templates
Stars: ✭ 53 (+278.57%)
Mutual labels:  android-application
media-picker
Easy customizable picker for all your needs in Android application
Stars: ✭ 167 (+1092.86%)
Mutual labels:  android-application
APNsKit
A framework to send Apple Notifications
Stars: ✭ 20 (+42.86%)
Mutual labels:  notification-service
Android-Clean-Architecture
🚀A basic sample android application to understand Clean Architecture in a very simple way and is written in Kotlin.
Stars: ✭ 39 (+178.57%)
Mutual labels:  android-application
Simpler
Simpler是一款轻量级的第三方微博应用,具有微博的基础功能,兼有外观优雅,运行流畅,内存占用低,省电省流量等特点。
Stars: ✭ 27 (+92.86%)
Mutual labels:  android-application
Scopy
An integrated negative design python library for desirable HTS/VS database design
Stars: ✭ 28 (+100%)
Mutual labels:  pypi-package

Lightweight Push Library

Lightweight Push is a simple and easy to use push service. It lets you send end-to-end encrypted push messages to your Android mobile devices without hosting your own services or building your own App. The library uses the AlertR Push Notification Service which is build atop of Google Firebase. You only have to install the official AlertR Android App from Google Play to receive the messages and create an account at alertr.de. After that you can directly use the Lightweight Push library.

Unlike some other push service providers, Lightweight Push offers you real end-to-end encryption. The message is encrypted in the Lightweight Push directly before sending and decrypted on your Android devices. Neither the AlertR Push Notification Service nor Google can read the messages. Some other providers use the term "end-to-end encryption" only as marketing and do not have it. For example, some providers use a web api where the message is sent via a HTTPS request to the server of the provider. To state the simplicity of their service, they show commands with curl and the like that will make such a request and send you a push notification. However, the message in the shown requests is unencrypted and the encryption is done by the server of the provider before it is sent to your devices. So even though they use HTTPS, the message can still be read by the provider and therefore it is no end-to-end encryption.

Lightweight Push uses channels to send your messages to different Android devices. The Android devices subscribe to the channels they want to receive the messages from. This allows you to send messages triggered by specific events to different devices. For example in a server context, a failed HDD is only interesting for people responsible for hardware issues, but a failed server is also interesting for people working on this server.

Due to technical reasons, the subject and message size is at the moment limited to 1400 characters. However, if you send a message that is larger than 1400 characters, it will be truncated and send to you. In the near future this will change and a bigger size will be allowed.

You do not want to use some service on the Internet for this but host everything yourself? No problem, each component needed to send push messages is Open Source.

A standalone console application for the library can be found here.

Installation and Usage

Lightweight Push is written for Python 2 and 3. For the encryption, it needs the pycrypto package. To make the installation of the Lightweight Push library as easy as possible, you can install it with pip via the following command:

pip install --user lightweightpush

Afterwards, all prerequisites are installed.

After you created and activated your alertr.de account, the library is very easy to use. The following small script will send a push notification message to your mobile devices:

import lightweightpush

push_service = lightweightpush.LightweightPush("[email protected]",
                                               "super_secret_password",
                                               "shared_secret_to_encrypt_msg")
push_service.send_msg("Subject of Message",
                      "Message text",
                      "MyChannel")

In order to receive the messages on your Android devices, you have to install the AlertR Android App. The App settings screen looks like the following:

Android App Settings

In the Channel setting, a comma separated list of channels you want to receive with this device has to be set. As setting for our example configuration, we set only the following channel:

MyChannel

The E-Mail Address setting is the used alertr.de username.

The Shared Secret setting is used to decrypt the received messages. It has to be the same as the one configured in the Lightweight Push script.

shared_secret_to_encrypt_msg

Video

A full video that shows how to set up Lightweight Push and write code with the library is shown here:

Infrastructure

The following image shows the used infrastructure:

alertR Infrastructure Push

Lightweight Push will encrypt your message with your shared secret and send it to the alertR Push Notification Service. The end-to-end encryption ensures that neither the alertR Push Notification Service nor the Google Firebase service is able to read your message. The message will be sent on a channel that you choose. The channel is used to be able to receive the same message on multiple devices you own or want to be able to receive the message. In order to prevent multiple uses of the same channel by different users and therefore collisions, the channel is linked to your alertr.de account. In the unlikely event that an attacker is able to deduce your used channel, only devices that know your used secret are able to decrypt the message. This is shown in the infrastructure image as an example. An attacker subscribes for the channel "MyAlarm" that is used by another user. The message is encrypted with the secret "MySecret". But only the device using this secret is able to decrypt the message.

Support

If you like this project you can help to support it by contributing to it. You can contribute by writing tutorials, creating and documenting exciting new ideas to use it, writing code for it, and so on.

If you do not know how to do any of it or do not have the time, you can support me on Patreon. Since services such as the push notification service have a monthly upkeep, the donation helps to keep these services free for everyone.

Patreon

Patreon

Paypal

Donate

Bugs and Feedback

For questions, bugs and discussion please use the Github Issues.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].