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. how to call java method, to get file from content:/...
Forum Updated to NodeBB v4.3 + New Features

how to call java method, to get file from content:/...

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

    Hi
    I need to get filePath from android content:/...
    I need this for MediaPlayer sourceVideo.
    It looks like all the heavy duty work is done in Ekke example https://github.com/ekke/ekkesSHAREexample/blob/master/android/src/org/ekkescorner/utils/QSharePathResolver.java
    But I have trouble calling this method, java class is in: android/src/org/ekkescorner/utils

        QAndroidJniObject jUri(url.toString().toLocal8Bit());
        jstring filename =QAndroidJniObject::callStaticMethod<jstring>("org/ekkescorner/utils/QSharePathResolver",
                  "getRealPathFromURI",
                  "(Landroid/content/Context;Landroid/net/Uri;I)Ljava/lang/String;",
                  QtAndroid::androidContext().object(),jUri.object());
    
    ld: error: undefined symbol: _jstring* QAndroidJniObject::callStaticMethod<_jstring*>(char const*, char const*, char const*, ...)
    

    Best Regards
    Marek

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Marek
      wrote on last edited by
      #2

      I have found different solution and it is working
      https://stackoverflow.com/questions/34006608/qt-and-android-get-path-from-image-in-gallery

      Best,
      Marek

      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