Android Question Can a user communicate with a background app?

David Kenny

Member
Licensed User
Longtime User
I can't really think of the best way to ask this so I will use a PC analogy.

Say I have a tray app that has no window. It has a global keyboard hook though, and it can watch for a particular key sequence. The app is notified by the user when they type Ctrl+Shift+s and it then captures the screen to a file in the background. The GUI isn't changed by the tray app and the current program never looses focus.

The communication to the service only needs to be a simple trigger.
 

David Kenny

Member
Licensed User
Longtime User
I've been busy on other projects for a while and am now revisiting the one that prompted this question.

Notifications go the wrong way in respect to "notification-flow".

What I got from reading up on Notifications is that the user can't initiate a Notification from whatever app they happen to be in. They can just respond to one. If I'm right, this solution won't work for me.

I was able to (on a previous phone) do a gesture that would trigger another app to perform a screen capture. It is possible that this feature was built into Samsungs implementation of Android OS for that phone and is not a normal feature of Android. This is the only Android example I can think of.
 
Upvote 0

David Kenny

Member
Licensed User
Longtime User
That was the ticket. I was skeptical when I first looked at it. But as I analysed what it was doing it made more and more sense how it could work for what I need. It wasn't immediately obvious to me that I could create the controls I need on the fly. And that is what I ended up doing. Thanks for the tip.
 
Upvote 0
Top