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. GPS on Windows Phone 8.1 ? (solved)
Forum Updated to NodeBB v4.3 + New Features

GPS on Windows Phone 8.1 ? (solved)

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 3 Posters 1.9k Views 1 Watching
  • 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.
  • J Offline
    J Offline
    jea1768
    wrote on last edited by
    #1

    I cannot make the GPS working on WindowsPhone 8.1 (Sensors are working)
    My code works well under Android but not under WP8.1.
    I'm using the latest Qt 5.4.0 - not clear if GPS is supported or not with WP8.1 ?

    Any idea how to access GPS with WP8.1 ?

    @
    QStringList services = QGeoPositionInfoSource::availableSources();
    source = QGeoPositionInfoSource::createDefaultSource(this);
    //source = QGeoPositionInfoSource::createSource(services.at(0), this); // services.at(0) = "winrt"

    if(source)
    {
        source->setPreferredPositioningMethods(QGeoPositionInfoSource::AllPositioningMethods);
        source->setUpdateInterval(2000);
        connect(source, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(positionUpdated(QGeoPositionInfo)));
        source->startUpdates();
    }
    

    @

    [edit: added missing coding tags @ SGaist]

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      AFAIK the plugin is there so it should be working. You should take a look at the "bug report system":http://bugreports.qt-project.org to see if there's something there about that

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jea1768
        wrote on last edited by
        #3

        No need of any plugin.

        just add
        <Capabilities>
        <DeviceCapability Name="location"/>
        </Capabilities>
        right after </Applications> tag in AppxManifest.xml.
        and it works.

        So, like Android, WP81 needs permissions to access devices.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          The plugin is still needed (and present) otherwise you wouldn't get any data ;)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mkalinow
            wrote on last edited by
            #5

            Youc an also specify the capabilities to be used inside the pro file, so that you do not need to manually update the Manifest each time. Check http://doc.qt.io/qt-5/qmake-variable-reference.html#winrt-manifest for more documentation.

            In that specific case add the following to your .pro file:

            WINRT_MANIFEST.capabilities_device = location

            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