Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Bundle java files with Qt android shared library
QtWS25 Last Chance

Bundle java files with Qt android shared library

Scheduled Pinned Locked Moved Solved Mobile and Embedded
3 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MajidKamali
    wrote on last edited by
    #1

    Hi.
    I created a library for android, written in Qt.
    This library has android specific Java file located at $$PWD/android/src/com/mylibrary/util.java
    Can I compile and bundle java files with my library?
    My actual problem is that, How can I use that library from another application calling those android functions?

    pro file contains:

    ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
    DISTFILES += android/src/com/mylibrary/utils.java
    

    Thanks :)

    benlauB 1 Reply Last reply
    0
    • M MajidKamali

      Hi.
      I created a library for android, written in Qt.
      This library has android specific Java file located at $$PWD/android/src/com/mylibrary/util.java
      Can I compile and bundle java files with my library?
      My actual problem is that, How can I use that library from another application calling those android functions?

      pro file contains:

      ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
      DISTFILES += android/src/com/mylibrary/utils.java
      

      Thanks :)

      benlauB Offline
      benlauB Offline
      benlau
      Qt Champions 2016
      wrote on last edited by
      #2

      @MajidKamali

      Example code:

      quickandroid/quickandroid.pri at master · benlau/quickandroid

      android {
          QT += androidextras
      
          QA_JAVASRC.path = /src/quickandroid
          QA_JAVASRC.files += $$PWD/java/quickandroid/SystemDispatcher.java \
                              $$PWD/java/quickandroid/QuickAndroidActivity.java
      
          INSTALLS += QA_JAVASRC
      }
      
      1 Reply Last reply
      0
      • M Offline
        M Offline
        MajidKamali
        wrote on last edited by
        #3

        Thank you very much :)

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved