¿Pueden los servicios implementar SensorEventListener?

Can I use the SensorEventListener with a service?

I want to do something when my application is running in background with a service being active. When a user shakes the phone I want a code to run in background. So is it possible for services to detect shake changes??

Gracias de antemano!

preguntado el 10 de marzo de 12 a las 00:03

1 Respuestas

Yes, it is possible. Because, I saw an application (Avast) in which there is an option like whenever we lost the phone, we can request the device to get the GPS location with out the permission of the user and will send it to us to the web. The webservice will activate the Android services in the mobile which will automatically activate the GPS with out the users interface and will send the location.

respondido 10 mar '12, 03:03

Thanks! :) .. i implemented a service with shake listener to listen for a start cmd! - ritoshtch

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.