D David Kenny Member Licensed User Longtime User Oct 16, 2017 #1 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.
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.
Erel B4X founder Staff member Licensed User Longtime User Oct 16, 2017 #2 You can use notifications from a service. The user can also interact with the service with notifications. Upvote 0
You can use notifications from a service. The user can also interact with the service with notifications.
D David Kenny Member Licensed User Longtime User Nov 24, 2018 #3 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
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.
Erel B4X founder Staff member Licensed User Longtime User Nov 25, 2018 #4 Using a notification is the simplest and safest way to implement it. There is a special permission that allows your app to draw over other apps: https://www.b4x.com/android/forum/threads/draw-on-top-of-other-apps-permission.90513/#content Upvote 0
Using a notification is the simplest and safest way to implement it. There is a special permission that allows your app to draw over other apps: https://www.b4x.com/android/forum/threads/draw-on-top-of-other-apps-permission.90513/#content
D David Kenny Member Licensed User Longtime User Dec 18, 2018 #5 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
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.