In your AI Android Seismograph, you are using live data from the AI2 Accelerometer? What you see displayed
on your graph is the result of :
1) an inexpensive hardware accellerometer. whose mesurements are probably not precise
2) There is a significant time lag in the posting of AI2 graphics. AI2's graphic capabilities are limited. You might get better results by saving the data to a csv file, then later generating a graphic with a slow refresh rate using the csv or using the graphic capabilities of a Fusion Table or one of the other graphic tools that AI2 can access. Your curves might be smoother as you only collect sets of numbers but do not attempt to graph in real time.
3) There is a time lag in the period the Android cpu is attempting to calculate the integral. The calculation takes a few ms for each calculation. Depending on your sampling interval, the time lag might be a serious issue.
Combine all those limitations, and the graph you display on the device screen is remarkable.
To get improvements, you might want to post your graphic blocks, if you are comfortable sharing that information.
You posted the java code, but you did not post the blocks you used to calculate. You might have an error in transcription and translation of the java code into blocks.
Regards,
Steve