Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

Forums

OverviewFelgo 2 Support (Qt 5) › Using Spotify's Android SDK with Felgo

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #17162

    Kool
    #17164

    Günther
    Felgo Team

    Hi Kool!

    It is possible to integrate native SDKs for Android and iOS with Felgo, though this is a little more advanced topic. Most of the Felgo Plugins we offer use native SDKs behind the scenes to integrate e.g. services like Google AdMob, Facebook, etc …

    We usually use the following setup to provide the SDKs cross-platform for usage with QML:

    • Create a Qt C++ Component that handles communication from and to QML with signals, properties, slots, etc …
      See here to learn more about how to add and use C++ components in your QML/Felgo project.
    • For iOS, you can then directly add an Class Implementation with Obj-C to e.g. use a native iOS SDK.
      So when working with the class from QML, you actually go QML -> C++ (class definition) -> Obj-C (class implementation, works with iOS SDK)
    • For Android, you can use JNI (Java Native Interface) to run custom Java code from C++. In your case, you would use JNI to work with a custom Java Class that integrates and uses the Spotify SDK.
      For Android the pipeline then is: QML -> C++ (class definition) -> C++ (class implementation with JNI) -> Java Class (works with Android SDK)
    • In your *.pro configuration, you can also add configuration blocks like android { } or ios { } to link different class implementations depending on the platform you are building the project for. With this extension your class also works cross-platform then (with different SDKs per platform behind the scenes)

    Does this answer your question?

    Best,
    Günther

     

    #17165

    Kool

    Hi Gunther,

    Yes, thanks for the information.

    It’s not something I intend on doing for a while, but it’s good to have the information at hand.

    Many thanks!

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

RSS feed for this thread

You must be logged in to reply to this topic.