Hi, I've developed an application using a stylus (e.g., Samsung pen). As you know, when we click a button on the stylus, "Air command" (pop-up window) appears. My goal is "Overriding the air command into my custom functions"
First, I started with *SpenHoverListener" (supported by Samsung Spen SDK 5.0) and override the onHover function as follows.
private SpenHoverListener mHoverListener = new SpenHoverListener() {
@Override
public boolean onHover(View view, MotionEvent event) {
Log.e("Test",""+event.getButtonState());
updateHoverUI(event.getRawX(), event.getRawY(), event.getPressure(), event.getAction(), "Hover");
return true;
}
};
I can successfully monitor the button click event (BUTTON_STYLUS_PRIMARY => Button is clicked). HOWEVER, I cannot disable the air command.
Is there any way to disable the air command?
Best regards.
It was possible in previous note models and tablets to disable the Air command.
On Marshmallow (version 6) there's no such toggle.
To turn off the Air command feature of the Samsung Galaxy Note 4 (at release):
Go to Settings > Controls.
Tap on S Pen.
Tap on Air Command.
Disable Air Command.
The Air command (packagecom.samsung.android.service.aircommand
) is implemented via a system service.
Notionally You cannot programmatically remove/disable this Air service (permissions) and as a system service
it seems to have first dibs on the hardware events (you get them later/also and it's too late to stop Air if it is active).
That being said Greenify does it so I sought out other options and found Brevent. This is totally free source code it the GitHub (AS 3), I'm playing with it right now (be aware it contains C code so NDK required if you want to build it, or see ->). Brevent Play Store
For the users here this graying out is a problem, for you it might be a solution.
Here are some choice comments:
Some owners reported that air command in Galaxy Note 5 was grayed out. The cause of grayed out Galaxy Note 5 air command is usually due to some accessibility settings (Go to Accessibility and switch on Voice Assistant ?). Actually, when you enabled such accessibility settings, there were the warning message on air command. But most of time, nobody reads it.
I have a galaxy note 5 and everything was fine until the device suggest me to update its android software from 5.1.1 to 6.0.1
I have Note 5 and the Air command stopped working after I installed Norton Antivirus.
For your own personal use you can use the 'free' app:
(Android version 6+, even without root!) Greenify to disable the Air Command Service
(to disable system apps/services you need to make a small "donation" and the function is described as "experimental").