You can't calculate the displacement like this. The application note clearly says " When implementing positioning in 3 axes, extra processing is required to null the earth's gravity effect.", and that's the understatement of the month!
Nulling gravity is an enormous problem, unless your accelerometer is perfectly perpendicular to Earth's gravity vector! The accelerations you want to measure are probably on the order of $1m/s^2$ or less, right? That is overlaid by $\vec{g}=9.81m/s^2\vec{z}$. Before you can even estimate the displacement causing acceleration your are interested in, you have to determine angles of your three accelerometer channels relative to $\vec{g}$, then subtract $\vec{g}$. Thankfully that procedure will give you a direction towards the floor... however, you still don't know which way your $\vec{x}$ and $\vec{y}$ axes are pointing! Your accelerometer could be turning around 180 degrees while it is accelerating... and the real displacement could end up in the opposite direction of where you thought it was going. Now, a perfect acceleration sensor would not even be sensitive to this rotation, for that you would need a different sensor that can detect rotations! Such a gyroscope may, or may not be built into your device. Given the way most accelerometer chips are implemented, gyroscopes and accelerometers will not even sample synchronously, which means that you need to have a digital resampling filter in place to correlate the readings of both sensors to get a reliable six axis position/orientation vector. I don't think that the Android platform gives you enough information to do that, right now. iOS might... on newer phones and tablets which have both sensors.
Having said that, if you want to simplify things to the level you are on, right now, you can (theoretically) mount your cell phone on a straight rail, carefully rotate it, until the motion vector points exactly in the direction of one of the accelerometer axes, and that axis is perpendicular to $\vec{g}$ and then you can apply a good numerical integration algorithm to what it measures on one axis, like one of the higher order integrators described by http://mathworld.wolfram.com/NumericalIntegration.html.
I suppose that was your original question, right? I apologize for ruining your day with the description of the real problem, and I promise not to bore you with other goodies like calibration of offsets, gain drift, crosstalk (misaligned axes) and non-linearities.