Qt Creator tool setup for Android and serialport example.
-
Hello,
I am a noob in Qt and trying to setup Qt Creator IDE for Android apps development. After IDE config I tried to compile the blocking slave serial port communication example but getting some errors right at the beginning. I attach couple pictures. Can this example be deployed to Android? If not, does anybody have a hint where to start with USB serial port communication for Android? If yes, how do I need to setup the IDE for supporting this example I mentioned above?
Thanks in advance for any inputs.
Cheers,
Jan -
QSP is not supported on Android (and as on iOS).
-
@HeyBirdie said in Qt Creator tool setup for Android and serialport example.:
it really seems that the only way is using Java
No, no any way. Android has not API to access to the serial ports.
There are only tricks to use a 'direct' USB access (direct read/write to the USB endpoints) in case you have an USB/Serial adapter (need to use JAVA).
Besides, if your Android device is rooted, then you can try to use QSP there. You need then or open serial ports with root rights, or to change the 'startup' scripts to give to an serial port the user access (chmod or something else). For this you need to build QSP himself.
-
@HeyBirdie that's a mistake, QSerialPort is technically possible with android but you would need a rooted device in the first place.
You can still enable the support for android, but you will have to compile Qt yourself for that.
-
@J.Hilk said in Qt Creator tool setup for Android and serialport example.:
chnically possible with android but you would need a rooted devic
Oops, yes, I updated my post.
PS: But, IMHO, it is 'no way' in a common case (its only for geeks). :)