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. [Solved] How to add google play services lib to qt for android
QtWS25 Last Chance

[Solved] How to add google play services lib to qt for android

Scheduled Pinned Locked Moved Mobile and Embedded
12 Posts 7 Posters 12.3k Views
  • 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
    xanm
    wrote on last edited by
    #1

    I am developing one project and for now trying to add google play services lib
    it is very easy to do in eclipse i just need to add dependencies and add few lines to AndroidManifest.xml
    https://developers.google.com/mobile-ads-sdk/docs/

    But i have no idea how i can do the same in qt project.

    I use qt5.2

    i know that if i had jar file i must put it in libs folder of android sources.
    But this doesn't work in that case because google play services lib is not just jar file. It also had resources which is outside of jar. And if i put only jar in libs at start on emulator project quits with no found resources.

    So may somebody knows how to add java project to dependencies to qt project, or may be some way to put resources from google play services lib to qt project?

    [edit: marked this topic as solved, Eddy]

    1 Reply Last reply
    0
    • X Offline
      X Offline
      xanm
      wrote on last edited by
      #2

      ok i've found solution.

      may be this will help somebody

      first i did all what in this guide https://developers.google.com/mobile-ads-sdk/docs/

      then to add reference to library project i added project.properties file
      with

      @android.library.reference.1=../../../android/adt-bundle-mac-x86_64-20131030/sdk/extras/google/google_play_services/libproject/google-play-services_lib@

      path must be relative not absolute

      next what i need is to prepare google-play-services_lib

      i go to google-play-services_lib folder in sdk
      and run

      android update lib-project --path .
      ant clean
      ant release

      after that all i need is just run my project in qt creator

      1 Reply Last reply
      0
      • EddyE Offline
        EddyE Offline
        Eddy
        wrote on last edited by
        #3

        Thanks for posting your solution.

        Qt Certified Specialist
        www.edalsolutions.be

        1 Reply Last reply
        0
        • B Offline
          B Offline
          Brexis
          wrote on last edited by
          #4

          Hi thanks for sharing your solution. I tried it to use Google+ Api and it works fine.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            AlterX
            wrote on last edited by
            #5

            Good! I am trying to find a way to put ads in a specific view...

            Qt Ambassador
            Real-time cooperative teams: http://www.softairrealfight.net
            Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

            https://codereview.qt-project.org/...

            1 Reply Last reply
            0
            • A Offline
              A Offline
              alexleutgoeb
              wrote on last edited by
              #6

              Hi,

              which views are you speaking of? In case you're using QML for developing your app you can also have a look at our V-Play AdMob plugin here: http://plugins.v-play.net/doc/plugin-admob/

              Best,
              Alex

              1 Reply Last reply
              0
              • A Offline
                A Offline
                AlterX
                wrote on last edited by
                #7

                Hi,
                thanks it seems interesting.

                Qt Ambassador
                Real-time cooperative teams: http://www.softairrealfight.net
                Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

                https://codereview.qt-project.org/...

                1 Reply Last reply
                0
                • X Offline
                  X Offline
                  xanm
                  wrote on last edited by
                  #8

                  V-Play is commercial

                  here is my blog post how to add adMob on Android
                  http://xanm.blogspot.ru/2014/03/admob-in-qt.html

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    Sanchir Kartiev
                    wrote on last edited by
                    #9

                    I think so this app has been worked on real device (not terminal)

                    1 Reply Last reply
                    0
                    • X Offline
                      X Offline
                      xanm
                      wrote on last edited by
                      #10

                      What do you mean by that?
                      [quote author="sanchkart" date="1400506924"]I think so this app has been worked on real device (not terminal)[/quote]

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        Sanchir Kartiev
                        wrote on last edited by
                        #11

                        Today I can't test my program on emulator (Google Services exist)

                        1 Reply Last reply
                        0
                        • G Offline
                          G Offline
                          Galbarad
                          wrote on last edited by
                          #12

                          xanm, thank you for you solution

                          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