Using your smartphone's built-in sensors as a ROS node

I also found this github repo and it nearly works out of the box for android sensor messages to ROS.

Two important mentions:
-add maven2 to gradle file otherwise it will not work
-build the app from the linux terminal because then Gradle helps a lot