Geolocation is not working Ionic V1 project

Hello, I’m trying to find the user location in ionic v1 project for a guide application. I’m using the plugin in ionic doc

but I’m getting an error like

I added user permissions in androidManifest

 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />

Tested in ionic lab and android device same result.

My code for gelocoation is below:

 var posOptions = {timeout: 10000, enableHighAccuracy: false};
        .then(function (position) {
          var lat  = position.coords.latitude
          var long = position.coords.longitude
         var marker= {
              name: 'Your location',
              lat: lat,
              long: long,
              icon: 'images/locationPerson.png'
        }, function(err) {
            // error

Any help appreciated?

In order for a cross-origin frame to use these features, the embedding page must specify a Feature Policy which enables the feature for the frame. For example, to enable geolocation in an iframe, the embedder could specify the iframe tag as:

<iframe src=“” allow=“geolocation”></iframe>


The thing is i don’t use any iframe