Important: Please read the Qt Code of Conduct -

GPS on Windows Phone 8.1 ? (solved)

  • 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(, this); // = "winrt"

        connect(source, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(positionUpdated(QGeoPositionInfo)));


    [edit: added missing coding tags @ SGaist]

  • Lifetime Qt Champion


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

  • No need of any plugin.

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

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

  • Lifetime Qt Champion

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

  • 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 for more documentation.

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

    WINRT_MANIFEST.capabilities_device = location

Log in to reply