Android Question Help wanted using notification listener and creating a service

tsteward

Well-Known Member
Licensed User
Longtime User
I have never created a service type app before and was wondering if someone had a sample I could follow.

What I am trying to achieve.
I have an app GridConnect that monitors a reed switch sensor in my smart home system.
When the Garage door opens I get a notification
When it closes I get another notification

I want to write an app that deletes the notifications (I can turn them off but that would defeat the purpose), starts a timer when the door open notification is received and if the door closed notification is not received within say 5 minutes it alerts me somehow.
 

Attachments

  • Screenshot.jpg
    Screenshot.jpg
    421.5 KB · Views: 142

tsteward

Well-Known Member
Licensed User
Longtime User
Yes I have run the example and I can read the text of the notification.
I have no idea how to set up triggers to check the notifications every X seconds. I assume i need to.
No idea how to start a timer and react when time is up or cancel the timer if the close notification is sent.

App should run in background and popup if time between open and close notifications is too long.

Clueless
 
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
Scratch that idea I can't make it work. Thanks anyway
 
Upvote 0
Top