I think I see what you mean. Am I correct in saying you want some apps to be always launched floating? And you'd like to accomplish this by creating an AppContext Event Profile that triggers when the app is (attempted to be) launched, and then prevents that? And then you'd have your own Task that launches that app floating?
It's an interesting idea, and I'll see if I can come up with something. I can't promise anything though, as I am not certain it is possible. Maybe there's something in the ActivityManager that I can hook into.
You got it exactly.
I appreciate your looking into it.
If there isn't anything you can hook into, perhaps adding the option to block the launch intent on start while still capturing the event might work. (Oh! capturing the Launch Intent or Main Activity in a variable would be a huge plus too! $$)
Another use of this is, as an example, is redirecting.
I have a profile that launches 2 apps in specified order whenever my phone is idle on the home screen while charging with the screen on.
I first launch an app called Current Wallpaper (displays the wallpaper, live or not, in fullscreen). I then launch an app called Huge Clock with a transparent background. I end up with a nice clean desktop clock whenever my phone is idle.
I have this up all night as my bedside clock.
Right now I have a profile set so that whenever I launch Current Wallpaper, Huge Clock launches automatically right after. Works well enough, but I cannot use the Current Wallpaper app in any other context.
If I could capture, but prevent, launch of Huge Clock, I could set up a App Context profile for Huge Clock itself to run a task launching the apps normally in order. Thus I get the end result by monitoring the target app while freeing up Current Wallpaper.
A bit of a Rube Goldberg scenario, but I like the simplicity of this combination. Have not found another app that accomplishes this minimalist look.
Anywho... I appreciate your investigation. Let me know if I can test anything for you.
BTW: combining the power of Xposed and Tasker is PURE GENIUS! My mind is swimming at the possibilities. If you have the time, I think you could make some money with a fleet of integration apps.