Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. JNI via QML: Async or Sync
Forum Updated to NodeBB v4.3 + New Features

JNI via QML: Async or Sync

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 1.5k Views 1 Watching
  • 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.
  • S Offline
    S Offline
    Scrincer
    wrote on last edited by
    #1

    @
    Component.onCompleted: {
    whatever = MyJni.getName();
    nextline();
    }@

    Let say the getName method return a string, Will it wait for the java and c++ method to return before executing nextline() ?

    Thanks !

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Torgeir
      wrote on last edited by
      #2

      yes is the short answer, nextline() will only be executed after MyJni.getName() returns.

      How is MyJni.getName() implemented? Does it spin an event loop while waiting for a result? If so, that could be problematic.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Scrincer
        wrote on last edited by
        #3

        Nah my idea was to connect to the google play services through a JNI call, but apparently the gps connection is async and the method doesnt return anything to let me know when its done.. I need to know when its done to show my next screen only at this moment, I might have to go the other way around and call C++ from Java when the gps connection is completed..

        Thanks!

        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