Run this app named PhonePi Sensor Streamer or download it using ApkOnline. You can do it using our Android online emulator.
A short Note: A Pro version of this app was released on user request in May 2018. It can be accessed at https://play.google.com/store/apps/details?id=com.phonepiplus&hl=en_US
While both versions are suitable for use, the Pro version lets you choose the data format (CSV or JSON), timestamps each data point and has more robust support for all sensors.
It also streams userId field which is useful in a situation where multiple users stream information to a single server. The userId could then be used as a filter to distinguish between the users allowing you to do fun stuff like track the positions and chart out the movement of the users (for example).
Usage Details for this app: https://github.com/priyankark/PhonePi_SampleServer
(Please download the server from the above link and follow instructions in the README or follow instructions as outlined below)
PhonePi allows you to stream real-time data from sensors on your phone: Accelerometer, Gyroscope, Magnetometer, Orientation, Step Counter, Thermometer, Light Sensor, Proximity Sensor and Geolocation (Subject to availability on your device) to a WebSockets supporting server on your RaspberryPi.
You can choose to build your own server to get the data or clone and use the server at https://github.com/priyankark/PhonePi_SampleServer
Assuming you are using the sample server:
Ensure that your RaspberryPi and phone are on the same network. Note the IP address of your RaspberryPi. Run the server on your Raspi (Steps are in the repository's README.md)
The URL in the app needs to be entered in the format:
Enter update time for the required sensors that is the duration after which the data must be re-read and hit the switch. To disable, simply turn the switch off.
Multiple sensor data can be read at once (subject to the availability of the sensors on your device). This project makes use of WebSockets for the transfer of data. The server writes the data into a txt file but one can modify the server code to do whatever python allows them to :)
Run or download PhonePi Sensor Streamer using our android online emulator from ApkOnline.net