Results 1 to 4 of 4

Thread: How do I add Java code to Qt Android apps via Qt Creator

  1. #1
    Join Date
    Sep 2013
    Posts
    5
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows Android

    Default How do I add Java code to Qt Android apps via Qt Creator

    Greetings.

    I have a Qt 5.1.1 app running on Android that needs to manage Bluetooth connections. It appears that I’ll need to write a custom Java Bluetooth management class that I can then use JNI to communicate with.

    My question is: How do I add the Java code to my Qt Creator (v2.8.1) project so that it gets built into my app?

    Thank you

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How do I add Java code to Qt Android apps via Qt Creator

    I don't think you can do that. Qt apps are C++ apps with some static launcher code written in Java.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How do I add Java code to Qt Android apps via Qt Creator

    Is the external Qt Bluetooth module useful? http://qt-project.org/wiki/Qt-Add-ons-Modules

  4. #4
    Join Date
    Sep 2013
    Posts
    5
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows Android

    Default Re: How do I add Java code to Qt Android apps via Qt Creator

    Hi Chris

    Thanks for the info, but it looks like the code you pointed me to relies on the bluez linux bluetooth driver layer which, according to what I've read, is not guaranteed to be available on all android target devices. Since the Java layer (allegedly) provides me with that guarantee, I would like to use it if at all possible.

    Thank you
    Scott

Similar Threads

  1. Android Apps professional from India
    By myclass in forum Resumes
    Replies: 1
    Last Post: 5th September 2013, 04:36
  2. qt, creator and android
    By giugio in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 15th January 2013, 03:46
  3. Replies: 3
    Last Post: 17th July 2012, 21:58
  4. Native Client: create web apps using your existing C and C++ code.
    By thefatladysingsopera in forum Qt Programming
    Replies: 2
    Last Post: 21st August 2011, 11:17
  5. Replies: 8
    Last Post: 26th March 2011, 13:11

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.