0

Is there any way to execute command on android shell from Unity3D application?

I need to send some HEX data into serial port, for example:

echo -e -n '\xB5\x62\x06\x08\x06\x00\xC8\x00\x01\x00\x01\x00\xDE\x6A\xB5\x62\x06\x08\x00\x00\x0E\x30' > /dev/ttyMT0

I know that it can be done via Android plugin to Unity3D but I don't have any experience in writing one, so I'm looking to find easier way to do such simply task.

seek
  • 1,065
  • 16
  • 33
  • Possible duplicate of [How to run Android shell command from Unity3D](http://stackoverflow.com/questions/37045639/how-to-run-android-shell-command-from-unity3d) – Ian H. Sep 15 '16 at 13:59

1 Answers1

-1

The amount of time you will spend finding easy way, you can learn how to write a plugin. If you know this can be done by writing a plugin, you already know the easiest way of doing it. Here are some places to start learning:

http://www.what-could-possibly-go-wrong.com/creating-a-native-android-plugin-for-unity3d/

https://www.thepolyglotdeveloper.com/2014/06/creating-an-android-java-plugin-for-unity3d/

http://eppz.eu/blog/unity-android-plugin-tutorial-1/

Umair M
  • 10,298
  • 6
  • 42
  • 74