hassan moradnezhad
hassan moradnezhad

Reputation: 577

using android sensor to get Direction when moving android device

i'm going to make an app that will get Direction when moving android device on ground from

at first i need to reset x and y position to 0
then by moving android device , get the values !

i'm new in android and i don't know is there any sensor for it or not .
so i didn't try any code to share it :|

is it possible ? any idea ?
is that any sensor that may help me ?

" i have to use android device on ground and i can't pick up the phone "

Upvotes: 0

Views: 377

Answers (1)

Rakesh Polo
Rakesh Polo

Reputation: 461

Yea there is a sensor event listener in android using this you can get your requirements done. This is the official documentation. This sample tutorial will help you to start.

Upvotes: 1

Related Questions