8

I have got a Dell edge gateway 5000 with Linux Snappy 15.04 as OS.

I have installed the gateway access point and I can connect the gateway from my smartphone. Now, I need to read the smartphone sensors like accelerometer, touch screen co-ordinates, light, and so on.

The smartphone is an HTC M9 with Android 7.0.

Bence Kaulics
  • 7,843
  • 8
  • 42
  • 90
Joey
  • 81
  • 5

1 Answers1

2

From sensors you can register a listener to sensor events [1] and on every value you send it to a ByteArrayWriter/Listener pair over socket connection [2].

Socket needs only WLAN from the gateway, the rest of it is java code [3].

Complete solution needs some coding effort with the building blocks I gave.

[1] https://developer.android.com/guide/topics/sensors/sensors_overview.html

[2] https://stackoverflow.com/questions/17777692/android-streaming-sensor-data-continuously

[3] http://www.avajava.com/tutorials/lessons/how-do-i-make-a-socket-connection-to-a-server.html

mico
  • 4,351
  • 1
  • 18
  • 27