[Development] [QtSerialPort] Porting to Android

Laszlo Papp lpapp at kde.org
Thu Aug 1 15:03:34 CEST 2013


On Thu, Aug 1, 2013 at 1:13 PM, Denis Shienkov <scapig2 at yandex.ru> wrote:

> Hi Laszlo,
>
>
> > When the bugzilla entry was being submitted, I tried to ask around in
> #qt-labs, but there was not much reaction. I can understand it is not a hot
> topic. :)
>
> Probably the theme not hot, but users already start being interested in
> Android support, e.g.:
>
> http://qt-project.org/forums/viewthread/28736/
>

Yes, there is some interest in here, too:
https://bugreports.qt-project.org/browse/QTBUG-32672


>  Also there is an interest and at Russian-speaking forums (where even user
> to me sent a patch for Android Bluetooth). :)
>

Does it mean it works with that patch already to a certain runtime degree,
or it is just a "formality" patch? Would be nice to see coming to Gerrit.


> > but I have no experience with Android, nor time to explore, nor device.
>
> But I have Android the device (my smartphone ) :). And in principle, it is
> possible to try to begin implementation, at least in the research
> purposes  to a /dev branch or in a playground. I hope that after we will
> begin integration, somebody will help us.
>

I think 'dev' is fine. Perhaps, we could get RDA access from for instance
Digia? Tuukka, others? That could help the people not having physical
devices, but I do not know much about the platform. Perhaps, it is not
possible.


>  > Android contributions have been going to Qt for a while. Check
> QtSensors how they have managed the android bits, or QtMultimedia for
> reference. Also, there is Q_OS_ANDROID.
>
> Yes, thanks. I was inattentive and skip it.
>
> Now, having viewed again the source codes Qt5.1 I see that customization
> for Android is present at different places (both in QtBase, and in
> QtSensors, etc.).
>
>
> E.g.:
>
> QtBase has and *_android.cpp files, e.g.:
>
>
> http://qt.gitorious.org/qt/qtbase/blobs/stable/src/network/kernel/qdnslookup_android.cpp
>
> http://qt.gitorious.org/qt/qtbase/blobs/stable/src/corelib/kernel/qsharedmemory_android.cpp
>
> and /android directory:
>
> http://qt.gitorious.org/qt/qtbase/trees/stable/src/android
>
> But, files *_android.cpp don't contain any JNI's code, and /android
> directory has no h/cpp files.
>
>
> On the other hand, the structure of directories of modules QtSensors,
> QtMultimedia, etc.
> has other structure where everything that belongs Android there is in
> /plugins directory, but
> the source code for Win/Mac/Unix there in /src directory, e.g.
>
> ...
> /src/<source for win, mac, nix>
> /plugins/android/<source for android's JNI wrappers>
> /plugins/qnx/<source for .. >
> ...
>
>
> Thus, it isn't so clear to me... As to us to arrive and where to store
> implementation for Android for QtSerialPort?
> And as /plugins dir will interact with /src dir in relation to the result
> of compiling the output binaries of the module?
>
> :)
>

Having considered the structure QtSerialPort has in place, perhaps
Q_OS_ANDROID for the unix backends, or separate android backends depending
on nature of the investment.

By the way, this project seems to be very common, and they already have
some native code in place. Might be worth taking a look and investigate
before jumping on our own way:
https://code.google.com/p/android-serialport-api/

Laszlo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130801/68c1b73b/attachment.html>


More information about the Development mailing list