Forums

OverviewFelgo 2 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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support