Confirming bank transfers from Android notifications with 15 lines of Python
说明与用途
使用15行Python代码和Droidline工具,通过Android通知实现银行转账的自动确认。
问题
Small shops need to confirm bank transfers manually; bank APIs are costly and require contracts.
结果
Automated confirmation of bank transfers using only free notification data, eliminating manual marking and avoiding bank API costs.
工作流
- Install Droidline on the phone and PC
- Pair phone via QR code using
droidline pair - Run
droidline serveon PC to start server - Connect from code using
connect("s23") - Set notification filter to bank app package with
notify_filter(["com.example.bank"]) - Define callback to check notification text starts with "[Deposit]" and call
mark_paid - Register callback with
on_notification(callback=paid) - Run the script to listen for notifications
证据
Small shops that take bank transfers usually confirm them by hand: the bank app shows "deposit received", someone opens the order list and marks the order paid.
The phone already gets the information for free, as a notification. So I wired the notification straight into code.
There's no ADB, no USB debugging and no root. You pair the phone once by scanning a QR code from droidline pair.
- 记录日期: 2026-10-10T01:41:02.763Z