I've play'd around with @agraham's Reflection Library and android.WindowManager.LayoutParams...
to find a workaround for making floating apps without the use of StandOut.
I had partial success :
I'm using two activities in my test-app; both with transparent activity background and a panel, containing a Label for test messages...
A service with notification intent for starting the app in any screen-view.
But any view-type can be used there, imageviews, buttons, canvas etc.(!)...
The app uses
to can be overlayed to any running app...
I tested some combinations of setting Window Flags via Reflection Library.
The result is is a useable workaround for easy making floating apps with b4a.
The only issue i had, I can't figure out how wie can get a MotionEvent.ACTION_OUTSIDE
via agrahams Reflection library. So I will try to make an own small library for doing that.
For the moment we can make:
-the app floating over other apps
-on touch_up event in the firs activity Main let the floating app be docked
with the second activity, to can do actions in the underlaying apps.
-on tap Back-Button make with the first activity the app floating (moveable) again - and so on...
You can try my sample-Floater-project, attached here. And you can use the code for your own projects!
Any ideas for improving this project are welcome.
@agraham: is it possible to extend the reflection library's ontouch_listener with motion/touch_event.ACTION_OUTSIDE ? Then we could have real floating apps. - Moving/Docking without the workaround via Hardware-Button-focussed events...
to find a workaround for making floating apps without the use of StandOut.
I had partial success :
I'm using two activities in my test-app; both with transparent activity background and a panel, containing a Label for test messages...
A service with notification intent for starting the app in any screen-view.
But any view-type can be used there, imageviews, buttons, canvas etc.(!)...
The app uses
B4X:
AddPermission(android.permission.SYSTEM_ALERT_WINDOW)
I tested some combinations of setting Window Flags via Reflection Library.
The result is is a useable workaround for easy making floating apps with b4a.
The only issue i had, I can't figure out how wie can get a MotionEvent.ACTION_OUTSIDE
via agrahams Reflection library. So I will try to make an own small library for doing that.
For the moment we can make:
-the app floating over other apps
-on touch_up event in the firs activity Main let the floating app be docked
with the second activity, to can do actions in the underlaying apps.
-on tap Back-Button make with the first activity the app floating (moveable) again - and so on...
You can try my sample-Floater-project, attached here. And you can use the code for your own projects!
Any ideas for improving this project are welcome.
@agraham: is it possible to extend the reflection library's ontouch_listener with motion/touch_event.ACTION_OUTSIDE ? Then we could have real floating apps. - Moving/Docking without the workaround via Hardware-Button-focussed events...
Attachments
Last edited: