Java tutorial
//package com.java2s; import android.view.MotionEvent; public class Main { private static int[] getPointerIds(MotionEvent e) { int n = e.getPointerCount(); int[] r = new int[n]; for (int i = 0; i < n; i++) { r[i] = e.getPointerId(i); } return r; } }