Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detecting activity on touch screen mobile device - comparable to mouse movement? #8

Open
wesyah234 opened this issue May 20, 2015 · 2 comments

Comments

@wesyah234
Copy link

On a desktop, this package will detect mouse movement... is there any way to detect similar activity on a mobile device, ie, finger swipes of the page?... If a user is active, but not clicking buttons that cause meteor activity, It is timing out, but the same thing on a desktop would have mouse movement and thus would not time out...

@AdamBrodzinski
Copy link
Contributor

You should be able to use the touchstart event to trigger an activity. This should fire on the start of a drag/scroll. I think Meteor as of 0.6 supports tap events as well (not positive).

So in your meteor config file you could do this:

{
  "public": {
    "staleSessionActivityEvents": "touchstart touchend mousemove click keydown"
  }
}

@wesyah234
Copy link
Author

Awesome, thank you, that's what I needed! Any thoughts on detecting when the user is scrolling the sreen up and down? Basically, I'm looking for detecting any finger movement on the screen, as that would indicate the user is still around. Pressing and dragging the window up and down should be considered activity... although, now that I think of it, on a desktop, that would be equivalent to scrolling the scrollbar, which isn't probably triggering any mouse events...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants