[Q] Getting Airview working globally

Search This thread

homer.ali

Senior Member
Jan 17, 2011
59
28
OnePlus 7 Pro
Hi everyone,

I'm a proud new owner of a galaxy s5 (tmobile) and was playing around with the airview feature on the device when I noticed it suddenly working on third party apps.

To clarify: I mean I was able to hover my finger three inches above the screen in applications like google chrome, and whatsapp in order to get similar functionality to what you get when you have AirView enabled for samsung apps such as messaging and internet browser.

I definitely thought it was cool but this 'feature' seemed to go away on it's own and I couldn't quite how to get it re-enabled for all apps or why it was enabled in the first place. (It remained working on samsung apps)

So I did some digging around and it seems that information on this topic is surprisingly limited given that this is a feature that existed on the Galaxy S4 and by now should have matured at least a little.

In any case one app that seemed promising is discussed in this thread:
http://xdaforums.com/showthread.php?t=2705514

Unfortunately this app is quite unreliable (at least on the S5 with a TW rom) and the posters here seem at a loss as to the cause of its unreliability.

What I've found is that the issue seems to have to do with samsung apps messing everything up.

Basically if you manually enable the air view service using an app like activity launcher or even using the app linked above,
AirView will work perfectly in third party apps (provided that Airview is also enabled in the standard settings page).
However, if you launch any samsung app that uses AirView afterwards, then the service becomes disabled again as soon as you close that samsung app!

In other words what seems to be happening on the system side from samsung's point of view is this:

1)AirView option enabled in standard settings
2)Samsung app launched--> Airvew service starts
3)Samsung app quit --> Airview Service stops

Therefore, If you try to start the service on your own with an app like finger hover or manually, it will work until a samsung app is quit and sends a command to stop the service.

This explains why I originally observed Airview working on third party apps because its likely that when that happened, a Samsung app that used Airview quit unexpectedly before it could stop the Airview service. Therefore the service probably continued to work until I launched another Samsung app and quit it safely.


Now i'm not sure if samsung apps are closing the service because they're trying to save battery life or because they think that the cleanest way to use this service is to start it when you need it and stop it when you're done with it OR if they're doing this because they're jerks that don't want third party apps to be able to use this feature on this phone. Either way i'd like to get around it.

The way I see it, we can try to attack this problem using a couple of different methods:

1) We can try to modify samsung apps so that they no longer close the service on app quit <-- probably very difficult to do if not impossible
2) We can try to create a task that launches on every samsung app quit that restarts the service <-- probably bad on battery life and would negatively impact performance
3) We can try to create a task that launches the service on selected app launches (for example detect when a whitelisted app like chrome is launched, and starts the service for that app and quits it when the app is closed (much like how samsung does it)) <--probably the easiest method to implement but feels a bit like cheating :p
4) we can try to modify the service itself so that it can't be closed by apps <-- not sure how difficult this would be but would certainly like to test this method to determine negative side-effects.

What do you guys think? I definitely am looking for input on this so that we can solve this problem!