Android View onTouchListener¶
OnTouchListener not working ?¶
If your app is not registering touch events once the Contextual SDK has been integrated, it may be because the OntouchListener is not working. As Android only allows one OnTouchListener, please follow the steps below to ensure the apps native OntouchListener and the Contextual OntouchListener are working properly.
1 2 3 4 5 6 7 8 9 10 11
Enable/Disable Contextual OnTouchListener¶
Available for Contextual Version equal to or greater than 1.6.3, you can also enable or disable Contextual OnTouchListener. In the following function by passing true it will enable/re-enable the Contextual OnTouchListener, and a false value will completely disable the feature.
1 2 3 4
Still having trouble? See our Source code
Contextual uses the OnTouchListener to capture events in your app. These events - including page views or touch events - can then be used in experiments as filters. For example, to target users the third time they enter a view, the OnTouchListener would be required to capture the number of times a user has entered a screen view before that time.