You can find some useful utilities for Android development here.
ClickAnalyser
Or touch event analyser. Is a very simple tool that allows you to see whether a user clicks more on the left or the right side of your screen. It can be best used for ad placement and saves you about 20 minutes of your life.
How to?
First of all, you should get an instance of ClickAnalyser somewhere in the Activity you want to analyse. You probably want to create it in your onCreate-method:
private ClickAnalyser mAnalyser;
//...
public void onCreate(Bundle savedInstanceState) {
//...
mAnalyser = new ClickAnalyser(myActivity);
}
Now, you should call the analyser every time a touch event happens:
public boolean onTouch(View v, MotionEvent event) {
mAnalyser.addEvent(view, event);
}
When you are positioning your ad, you can call
mAnalyser.getMostClickedSideLeftRight();
or
mAnalyser.getMostClickedSideBottomTop();
now. It will return ClickAnalyser.LEFT, ClickAnalyser.RIGHT or ClickAnalyser.CENTER or ClickAnalyser.TOP, ClickAnalyser.BOTTOM or ClickAnalyser.CENTER.
This utility only analyses the MotionEvent and does not take the position of the View into consideration yet. As you can see, its a really simple tool, but still, it might be hepful.