Giter Site home page Giter Site logo

app-notification-listener's Introduction

app-notification-listener

监听安卓任意app通知栏消息内容,并将内容发送到服务器数据库

背景

监听消息通知用处很多,比如大家乐见的监听微信/支付宝到账通知实现支付回调。经过几天折腾,写了这个demo, 打通了从APP(安卓)获取任意消息通知并发送到服务端(PHP+MySql)的完整流程。

实现思路

继承安卓消息类NotificationListenerService,在调用onListenerConnectedonNotificationPostedonNotificationRemoved等方法时执行监听逻辑。

效果预览

APP演示动画(.gif ~3Mb):

后台界面:

app-notice-admin.png

Demo地址

apk安装包:http://denghao.me/special/appNotice/appNotice.apk (debug版,某些安卓版本可能运行不了)

提醒

  • Android非我专业, 这个demo是自己参考各方资料后拼凑出来的,仅供学习使用。
  • 跑起APP需要安装一堆软件和依赖包,请作好心理准备。

联系我

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.