Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › Detecting earphones

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #16517

    Kool

    Hi All,

    I’ve scouted Qt forums for an idea of how to detect whether earphones are plugged into a device or not. I didn’t find any clues on it.

    Does anyone have any clues on if this is possible?

    Many thanks!

    #16525

    Günther
    Felgo Team

    Hi Kool!

    As I think there is no ready-made cross-platform solution by Qt for doing this, the only way is to directly use native Android code (Java) to detect the Headphone state.

    For example with a solution as described here: https://stackoverflow.com/questions/6249023/detecting-whether-a-headset-is-plugged-into-an-android-device-or-not (you can also look for other other solutions, frameworks, … )

    To integrate native Java code with your Felgo application (QML) it is required to go through Qt C++, which allows to use JNI (Java Native Interface) to run native Java code. For more information, please see Integrating C++ and QML and the Android Extras / JNI features.

    We can help with implementing this feature with the purchase of a Support Package to cover the required development hours. Just contact us via email at support@felgo.com if you’re interested in an offer.

    Best,
    Günther from Felgo

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded