$cordovaDeviceMotion working example

Can anyone provide this form me. I have found examples using phonegap but not ionic. It can be as simple a firing a console log when a shake is detected. I would also like to perform different things when the shake is detected depending on what view the user is in.


Give me 2-3 hours and I will write you a working example.

I wrote a tutorial for you, find it below.

###Click here.

You will need to modify it a bit so it can work in different views. Create service/factory, move device motion code there and trigger it on view level.

1 Like

hi do u have any method to use ionic device motion?