android - Is there a limit (time or number) for the historical MotionEvent's? -


i have overwritten methode dispatchtouchevent of activity grab motionevents (just added logging). observed gethistorysize() methode don't have size of 1-2. typical , "historical" events of motion dont save more 1-2 events ? expected high number of historical events when dont lift finger time.

@override     public boolean dispatchtouchevent(motionevent ev) {           for(int i=0;i<ev.getpointercount();i++){              log.i("humanrawmotion",(                     "action: "+ev.getaction()                     + " downtime: "+ev.getdowntime()                     + " eventtime: "+ev.geteventtime()                     + " pressure: "+ev.getpressure()                     + " finger x "+i+": getaxisvalue(0) " + ev.getaxisvalue(0, i)                     + " finger y "+i+": getaxisvalue(1) " + ev.getaxisvalue(1, i)                     + " flag: "+ev.getedgeflags())                     + " historicalsize: "+ev.gethistorysize()                 );           //dont touch ! (original implementation of methode         if (ev.getaction() == motionevent.action_down) {             onuserinteraction();         }         if (getwindow().superdispatchtouchevent(ev)) {             return true;         }         return ontouchevent(ev);     } 

here output of log, while touching , moving single finger around display:

01-28 13:19:37.984  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 0 downtime: 158340135 eventtime: 158340135 pressure: 0.675 finger x 0: getaxisvalue(0) 630.0 finger y 0: getaxisvalue(1) 674.0 flag: 0 historicalsize: 0 01-28 13:19:37.999  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158340135 eventtime: 158340146 pressure: 0.675 finger x 0: getaxisvalue(0) 627.38184 finger y 0: getaxisvalue(1) 671.90546 flag: 0 historicalsize: 1 01-28 13:19:38.065  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158340135 eventtime: 158340212 pressure: 0.58750004 finger x 0: getaxisvalue(0) 626.25 finger y 0: getaxisvalue(1) 670.75 flag: 0 historicalsize: 2 01-28 13:19:38.069  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 1 downtime: 158340135 eventtime: 158340218 pressure: 0.58750004 finger x 0: getaxisvalue(0) 626.25 finger y 0: getaxisvalue(1) 670.75 flag: 0 historicalsize: 0 01-28 13:19:58.122  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 0 downtime: 158360275 eventtime: 158360275 pressure: 0.71250004 finger x 0: getaxisvalue(0) 547.5 finger y 0: getaxisvalue(1) 1023.0 flag: 0 historicalsize: 0 01-28 13:19:58.147  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360290 pressure: 0.725 finger x 0: getaxisvalue(0) 545.25 finger y 0: getaxisvalue(1) 1023.0 flag: 0 historicalsize: 1 01-28 13:19:58.180  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360328 pressure: 0.75 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1023.5117 flag: 0 historicalsize: 1 01-28 13:19:58.197  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360344 pressure: 0.7625 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1024.3497 flag: 0 historicalsize: 1 01-28 13:19:58.214  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360361 pressure: 0.7625 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1025.151 flag: 0 historicalsize: 2 01-28 13:19:58.230  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360378 pressure: 0.77500004 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1025.9537 flag: 0 historicalsize: 1 01-28 13:19:58.247  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360394 pressure: 0.7625 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1026.7559 flag: 0 historicalsize: 2 01-28 13:19:58.264  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360411 pressure: 0.7625 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1027.5531 flag: 0 historicalsize: 2 01-28 13:19:58.280  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360428 pressure: 0.7625 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1028.3606 flag: 0 historicalsize: 1 01-28 13:19:58.300  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360444 pressure: 0.77500004 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1029.1615 flag: 0 historicalsize: 2 01-28 13:19:58.314  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360461 pressure: 0.77500004 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1029.966 flag: 0 historicalsize: 1 01-28 13:19:58.330  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360478 pressure: 0.7875 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1030.7684 flag: 0 historicalsize: 2 01-28 13:19:58.347  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360494 pressure: 0.7875 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1031.5704 flag: 0 historicalsize: 2 01-28 13:19:58.364  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360509 pressure: 0.7875 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1032.25 flag: 0 historicalsize: 1 01-28 13:19:58.414  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360561 pressure: 0.7875 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1032.7789 flag: 0 historicalsize: 1 01-28 13:19:58.431  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360578 pressure: 0.7875 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1033.5829 flag: 0 historicalsize: 2 01-28 13:19:58.449  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360592 pressure: 0.7875 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1034.25 flag: 0 historicalsize: 1 01-28 13:19:58.464  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360611 pressure: 0.8 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1034.5911 flag: 0 historicalsize: 1 01-28 13:19:58.497  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360636 pressure: 0.8 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1035.1934 flag: 0 historicalsize: 1 01-28 13:19:58.631  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360778 pressure: 0.8 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1035.5144 flag: 0 historicalsize: 1 01-28 13:19:58.648  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158360789 pressure: 0.8 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1036.25 flag: 0 historicalsize: 1 01-28 13:20:00.638  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158362784 pressure: 0.8125 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1037.25 flag: 0 historicalsize: 2 01-28 13:20:00.927  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 2 downtime: 158360275 eventtime: 158363070 pressure: 0.7 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1036.5 flag: 0 historicalsize: 0 01-28 13:20:00.928  31404-31404/com.myapp.myapp i/humanrawmotion﹕ action: 1 downtime: 158360275 eventtime: 158363080 pressure: 0.7 finger x 0: getaxisvalue(0) 546.0 finger y 0: getaxisvalue(1) 1036.5 flag: 0 historicalsize: 0 

the history saved not history in sense saves events starting last down pointer, instead android batches few motionevents when needed maintain performance. stored in history.

you can refer batching section of motionevent docs more info on this.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -