- Home /
Question by
Braxatoris · Apr 07, 2017 at 03:02 PM ·
androidaccesspermissionsserialport
Serial ports permissions in android
Hi.
Im making app in unity for android, which will be reading from serial com port... At this time i cant try it on prototype so im preparing. So i made simple script which will start and list all available.
void Start()
{
string[] s = SerialPort.GetPortNames();
for (int i = 0; i < s.Length; i++)
{
portList.text += s[i] + "\n";
}
}
But i when i run script on my test tablet nothing happens. After looking at logs through Android Monitor from android SDK, i can see unity throwing UnauthorizedAccessException: Access to the path "/dev" denied. I looked it up and there is nothing about this at all. So Im guessing that either im doing something wrong or i need rooted tablet...
So i know how to work with com ports... i just need access to them on android.
Can you please help me ?
Comment