Remove All Ads from XDA

[MOD][XPOSED] Force Touch Detector

185 posts
Thanks Meter: 392
By tkgktyk, Senior Member on 8th June 2015, 09:38 AM
Post Reply Email Thread

Force Touch Detector
Force Touch Detector (FTD) is a Xposed module to detect Force Touch and switch touch action. FTD assigns seven force actions:
  • Tap
  • Double Tap
  • Long Press
  • Flick Left
  • Flick Right
  • Flick Up
  • Flick Down
Of course FTD doesn't bother normal operation by the threshold of pressure.

Android reports pressure of your touch when you tap, press, swipe, and so on. However the pressure is different from Apple's Force Touch Technology. (It is mechanical implementation, isn't it?) Android's pressure is depending on touch area of your finger, not strength. But the touch area provides us new UI.

Force Touch on Android
If you touch with the ball of your finger, the touch area increases. Call this "Force Touch" in this project. It is possible to distinguish ordinary touch operation from deliberately Force Touch because there is a distinct difference between these touch area. By checking whether a touch event is started from Force Touch, you can change the action of the touch.

  • Open floating launcher when you do force tap that is a tap started from Force Touch.
  • Go back by performing force flick to right that is a flick started from Force Touch.
  • Expand notifications by performing force flick to bottom anywhere.

Getting Started

At first, check your hardware supports FTD functions or not. Open a threshold screen, Pressure -> Threshold, and then test tap and force touch with two buttons. If Max, Pressure and Ave are changed by each touch, your touch screen supports the pressure parameter, you can use FTD by pressure. If not so, your phone doesn't support pressure, next try Size -> Threshold screen.

Note that some smartphones don't support both the pressure and the size parameter. FTD doesn't work on such a device.

After checking the capability of your touch screen, practice and adjust Force Touch with Threshold screen. Tap small button and do force touch on large button 5 times or more respectively, you'll get a Max value for normal tap and an Ave value for force touch. The Ave value must be higher than the Max value, you should practice force touch until so.

Finally, input a number between the Ave and the Max, and turn Master Switch on.


There are 3 parameters to adjust sensitivity for force touch.

When pressure or size of your touch exceed this value, it is recognized as a force touch.
Detection Window
The length of time FTD waits for force touch. If zero, FTD checks only the beginning of your touch stroke.
Detection Sensitivity
The sensitivity for force tap and flick. If zero, Force Touch is always interpreted as a flick. If too high value, it is always tap. The range is 0 to about 20, depends on hardware.
I propose two strategies for adjustment.
  1. Long detection window and high threshold value
  2. Short detection window and mid threshold value

Maybe the experience of the former is near to Apple's Force Touch, squashing. However Android devices detect the pressure of touch by touch area even if you enable Pressure Threshold. In the other words, FTD's Force Touch based on Android API and Apple's one are fundamentally different. So I recommend to try both strategies.

Pressure vs. Size
These touch parameter depend on your hardware. Some phones report both parameters, some phones report only one parameter, and there may be some phones that don't report neither.
Reported Devices (shared/editable spreadsheet)

I tested on Nexus 4 running AOSP 5.1.1.

Q. Does this mod work on my phone?
Activate the pointer location in dev options to see your touch pressure and size. If they are always same value, your hardware doesn't support them.

Xposed Module Repository

XDA:DevDB Information
Force Touch Detector, Xposed for all devices (see above for details)

Source Code:

Xposed Package Name: jp.tkgktyk.xposed.forcetouchdetector

Version Information
Status: Stable
Stable Release Date: 2015-07-28

Created 2015-06-08
Last Updated 2016-10-25
The Following 65 Users Say Thank You to tkgktyk For This Useful Post: [ View ] Gift tkgktyk Ad-Free
8th June 2015, 09:52 AM |#2  
ravijani's Avatar
Senior Member
Thanks Meter: 4,109
can you make how to video?? cant seem to get it work.
The Following 5 Users Say Thank You to ravijani For This Useful Post: [ View ] Gift ravijani Ad-Free
8th June 2015, 02:18 PM |#3  
Senior Member
Flag damascus
Thanks Meter: 138
I dont really get what is the advantages of this module.. ?
The Following 3 Users Say Thank You to tornido067 For This Useful Post: [ View ] Gift tornido067 Ad-Free
8th June 2015, 02:26 PM |#4  
Senior Member
Thanks Meter: 62
Love to see a video too.
8th June 2015, 02:49 PM |#5  
Junior Member
Thanks Meter: 1
Thumbs up
Very interesting concept! Love to see more information about how to "properly" use this module.

By the way dev, isn't there already a thread for this module earlier? Have you upgrade the module so a new thread is open as well?

Great job! Will give it a try now~
8th June 2015, 03:44 PM |#6  
Senior Member
Thanks Meter: 77
VĂ­deo for us
8th June 2015, 05:33 PM |#7  
HorstiG's Avatar
Senior Member
Flag Banja Luka RS
Thanks Meter: 2,601
Works with CM12.1 ?

HGT - S5 G900F - Oneplus One - Tesla TTL7
8th June 2015, 06:33 PM |#8  
android404's Avatar
Senior Member
Thanks Meter: 776
I found out how it works on my z3 running Android 5.0.2.

What the developer means with his explanations is that you don't use the tip of your thumb but instead you place the thumb flat on the screen. You press or long press or swipe as usual, except you do it with the thumb flat on the screen. Don't press harder or in any different way then usual except of the thumb being flat.

Open the app, forget about half the settings and all the explanations and simply put "pressure threshold" to 0.7 and assign desired actions to the different commands. For example: click on the action "tap", chose "apps" and chose "YouTube". Then go to your homescreen (or into any other app) to test. You can not test while the module itself is in the foreground.

If you do it right, the "press with flat thumb" doesn't count as a normal press. This means you can press anywhere to execute the command, without ab care for what would happened if you pressed normally at same spot.

It takes some practice but once you got it, you got it. A good module with potential.
The Following 5 Users Say Thank You to android404 For This Useful Post: [ View ] Gift android404 Ad-Free
8th June 2015, 09:33 PM |#9  
Flag BA
Thanks Meter: 9
Thumbs up
set to 0.8 on the OnePlus One (CM 12.1)
The Following 2 Users Say Thank You to k0sTi For This Useful Post: [ View ] Gift k0sTi Ad-Free
9th June 2015, 09:53 AM |#10  
Thanks Meter: 10
Moto g LTE with 5.1
Works fine, set up to 0.6
I think that would be great to limit the area where we input a force touch, maybe in the bottom area of the screen.
The Following 2 Users Say Thank You to sclcn12 For This Useful Post: [ View ] Gift sclcn12 Ad-Free
9th June 2015, 10:10 AM |#11  
OP Senior Member
Thanks Meter: 392
Everyone, I apologize for any confusion.
#8 posted by @android404 and #10 posted by @k0sTi are great helpful. Thanks a lot!

Many thanks! "press with flat thumb", yes, that's all!
I wanted to explain as you said. I'm going to simplify Pressure Threshold screen.

Originally Posted by sclcn12

Moto g LTE with 5.1
Works fine, set up to 0.6
I think that would be great to limit the area where we input a force touch, maybe in the bottom area of the screen.

The implementation is easy probably. I try to append your suggestion.
The Following 5 Users Say Thank You to tkgktyk For This Useful Post: [ View ] Gift tkgktyk Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes