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. JNI ArrayList<String> to QAndroidJniObject

JNI ArrayList<String> to QAndroidJniObject

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 552 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.
  • L Offline
    L Offline
    linuxkid
    wrote on last edited by
    #1

    Hey guys, I've been looking into JNI, and for a function (sendMultipartTextMessage) I need to pass an ArrayList<String>, for which I have two doubts:

    1. What would the string to define the object be? java/util/arraylist is the class, however, what about the type (String) ?
    2. How do I turn a QList<QString> to a QAndroidJniObject? For string there's a QAndroidJniObject::fromString(), but the only other option is ::fromLocalRef<jobject> function (which I'm not very clear on usage).

    From the documentation:
    https://doc.qt.io/qt-5/qandroidjniobject.html

    jobjectArray [Ljava/lang/Object;

    I guess JAVA will then interprete it as each of those Objects being a String inside the ArrayList?

    Regards..

    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