Skip to content

KeyWeeUsr/android-notification-buttons

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Android Notification Builder for Python

Provides a simple way of building Android notifications with buttons with callbacks, no java knowledge required.
Buttons allow you to control your background services while using other apps

screenshot

How to use

Copy "noti_builder" folder to "service/" folder

Import

from noti_builder.noti_builder import Notification_Builder

Instantiate

nBuilder = Notification_Builder()

Set title, message, ticker

nBuilder.set_title('myTitle')
nBuilder.set_message('myMessage')
nBuilder.set_ticker('Button example')

Add buttons, if required

## 0. Displayed button name
## 1. icon integer available at https://developer.android.com/reference/android/R.drawable.html
## 2. callback
## action= android PendingIntent action, button name will be used if not provided
nBuilder.add_button('Play', 17301540 , callback, action='Play')

Build

nBuilder.build()

Remove buttons with

nBuilder.remove_buttons()

Start/Stop BroadcastReceivers with

nBuilder.start()
nBuilder.stop()

About

Android Notification Builder for Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%