Details
Description
Here's minimal QML to test geolocation support by using google api example page:
import QtQuick 2.5 import QtQuick.Window 2.2 import QtWebView 1.1 Window { visible: true WebView { anchors.fill: parent url: 'https://developers.google.com/maps/documentation/javascript/examples/map-geolocation' } }
AndroidManifext.xml contains:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
Test app settings shows that there is available permission:
precise location (GPS and network based)
But when Google Maps API example page loads, popup appears with text:
Error: The Geolocation service failed.
openstreetmaps.org also shows error:
Geolocationerror: User denied Geolocation.
There is no user prompt asking about permission. When openstreetmaps.org is opened in Chrome browser (not webview), it works OK after prompt.
I cannot test with iOS though.