Results 1 to 5 of 5

Thread: QT in Android -- Example for accessing the GPS Service

Threaded View

  1. #1
    Join Date
    Mar 2010
    Location
    Nairobi, Kenya
    Posts
    252
    Thanks
    23
    Thanked 16 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Smile QT in Android -- Example for accessing the GPS Service

    Hi,

    Note: This application uses Necessitas that is a QT Lighthouse port to Android devices by BogDan Vatra. Please find all what you need to build the example here: http://sourceforge.net/p/necessitas/home/

    Now,

    After two weeks of intense headaches I finally got a QT application to use the Android GPS service and have location readings.

    You can access it from: www.qlands.com/other_files/Android_GPS.tar.gz

    PLEASE read the README_ME_FIRST_OR_IT_WILL_NOT_WORK file before you get too excited!

    For BogDan Vatra et al.:
    I had to make some slight changes to:
    1- qtmain_android.cpp
    2- QtApplication.java

    And I sadly had to add a new java class called gpsListener.java to eu/licentia/necessitas/industrius . Yo can read the readme file to find out why.

    I would love to include those changes in the android-lighthouse project if you can direct me how. I am not very versed with git stuff.

    I tested it on my Samsung Galaxy 5 (Android 2.1). I built the apk using the latest sdk and ndk. I downloaded android-lighthouse from git.

    The normal jni.h that its included in the original qtmain_android.cpp is not compatible with the jni.h from Oracle. Hence the inclusion of Oracle's jni.h in the .pro.

    With no further comments, enjoy the GPS from QT applications in Android!

    Carlos.
    PD
    License information inside the readme
    18th May 2011 at 12:57 (GMT+3) - I just posted a new tar.gz. It corrects a bug in the qtmain_android.cpp with prevented other applications to run because they don't have gpsListener.java.
    Last edited by qlands; 18th May 2011 at 11:57.

  2. The following 3 users say thank you to qlands for this useful post:

    ceoccarter (27th June 2011), raja26 (16th November 2011), Xplat (27th November 2011)

Similar Threads

  1. Qt for Android. Necessitas
    By freely in forum Newbie
    Replies: 3
    Last Post: 27th May 2011, 19:12
  2. Qt on Android - where is Qt own effort in it?
    By TorAn in forum General Discussion
    Replies: 25
    Last Post: 11th May 2011, 08:13
  3. Qt in Android Possible?
    By Prabha in forum Installation and Deployment
    Replies: 5
    Last Post: 11th May 2011, 08:11
  4. qt on android
    By carlovv81 in forum General Discussion
    Replies: 3
    Last Post: 1st February 2011, 12:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts