Thanks Vikas! Unfortunately your suggestion only works with Activities in foreground . I only have a service.
On Oct 18, 12:30 pm, Vikas KM <[email protected]> wrote: > Hi, > > Assuming that you want to trigger and action on Longpress.. > Hope this helps > > http://developer.android.com/reference/android/view/GestureDetector.O...http://www.ceveni.com/2009/08/android-gestures-detection-sample-code.... > > basically the touchevent is sent to the gesture where the longpress gets > detected. > > public boolean onTouchEvent(MotionEvent me) > { > return gestureScanner.onTouchEvent(me); > > } > > -------------- > Regards > Vikas KM > > > > > > > > On Tue, Oct 18, 2011 at 2:37 PM, pedramz <[email protected]> wrote: > > Is it possible to detect a user's long screen press from a service? > > > I need a quick and easy way for the user to trigger an action in my > > service but I have not managed to find a good solution for that yet. > > > Thanks for any suggestions! > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

