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

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 23 Oct 2015, 11:06 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 :)

    B 1 Reply Last reply 23 Oct 2015, 18:12
    0
    • M MajidKamali
      23 Oct 2015, 11:06

      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 :)

      B Offline
      B Offline
      benlau
      Qt Champions 2016
      wrote on 23 Oct 2015, 18:12 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 24 Oct 2015, 06:14 last edited by
        #3

        Thank you very much :)

        1 Reply Last reply
        0

        1/3

        23 Oct 2015, 11:06

        • Login

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