This method in Android, MotionEvent.getPointerCount (), has only been starting to use since API level 5.
However, my project is targeted to Android OS v2.2 (API level 8).
So I wonder what Android will do when run my project in a device with API level 4.
I have tried once, but it seemed no exception or crash, I do not know why?
@Override
public boolean onTouch(View v, MotionEvent event) {
int pointCount = event.getPointerCount();
...
}
FYI, the above codes will cause compiling error when I set the API level of my project to 4.
In Android if you use a method that is not available you will get a NoSuchMethodException.
You can look at Backward Compatibility for Applications for more information.
So the answer to your question is: Yes, one app can run smoothly while having errors in a lower API.