D
D
Dirollo2020-07-28 18:50:49
Python
Dirollo, 2020-07-28 18:50:49

Push notifications python android?

How to push views in Python for Android?
I will be grateful for help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Megum1n, 2020-07-29
@Dirollo

I didn’t quite understand the question, but you can send yourself notifications from the Python code with API requests.
You install the Pushbullet application and send requests like:

url = 'https://api.pushbullet.com/v2/pushes'
data = {
    "body": "text",
    "title": "subject",
    "type": "note",
    "device_iden": "12345"
}
headers = {
    "Access-Token": "token",
    "Content-Type": "application/json"
}
response = requests.post(url, data=json.dumps(data), headers=headers)
print(response.text)

See the documentation for methods .
Similarly, you can send messages using bots in Telegram .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question