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 intents from Qt app in Android?
Forum Updated to NodeBB v4.3 + New Features

How to call intents from Qt app in Android?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
3 Posts 2 Posters 854 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.
  • X Offline
    X Offline
    xtingray
    wrote on last edited by
    #1

    Hi everybody,

    I am developing a Qt app for Android and one of my requirements is to implement the classic "Share through social networks" feature. The object I need to share is a string containing an URL and that's it.

    I have been searching around and there are several nice resources like these:
    http://stackoverflow.com/questions/30128718/general-share-button-on-android-in-qt-quick
    http://blog.lasconic.com/share-on-ios-and-android-using-qml/
    http://stackoverflow.com/questions/22672522/qt-qml-android-best-practice-to-send-a-custom-intent-share-url

    As far as I can see, there are several approaches to implement these, at least depending on the year of the article. Any way, I would like to read experiences or recommendations from people who already implemented these kind of features.

    Right now is there a standard/official way about how to call intents from Qt? I appreciate any comment about it. Thank you! :)


    Qt Developer

    1 Reply Last reply
    0
    • V Offline
      V Offline
      Violet Giraffe
      wrote on last edited by
      #2

      One way is to subclass the QtActivity, implement the functionality in Java and use JNI to trigger it.
      Another way is to use JNI all the way with no .java files.

      1 Reply Last reply
      0
      • X Offline
        X Offline
        xtingray
        wrote on last edited by
        #3

        Finally I followed the instructions described here:
        http://blog.lasconic.com/share-on-ios-and-android-using-qml/

        Using part of the code available here:
        https://github.com/lasconic/ShareUtils-QML

        So, I could implement the "share" feature quickly and with no issues :)


        Qt Developer

        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