Android GPS Permission Request popping up only when compile on a windows

Hello,
We have this ‘weird’ behavior on our project. When I compile from my mac the Android package I do not get the user request permission to access the Localtion on Android device, but when we compile on Windows10, the package build works perfectly.
We tried to compare plugins, platforms but could not identify what are the differences that could explain this.

Could anyone one help us to identify what could be the problem on the mac ?

ionic info

cli packages: (/Users/raphaelkoch/Documents/SourceTree/LookIV_Ionic/node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 7.1.0 

local packages:

    @ionic/app-scripts : 3.1.2
    Cordova Platforms  : android 6.2.3 browser 5.0.1 ios 4.5.3
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    ios-deploy        : 1.9.2 
    Node              : v6.11.1
    npm               : 5.4.2 
    OS                : macOS Sierra
    Xcode             : Xcode 9.1 Build version 9B55 

Environment Variables:

    ANDROID_HOME : /Users/raphaelkoch/Library/Android/sdk/

Misc:

    backend : legacy

Do you mean the Android permission request?

Normally, when a permission is accepted, it won’t prompt again.
Only when you delete the app and reinstall it, it will ask again.

Yes, I mean Android Permission request (the pop-up that the user has to accept when you need the GPS location)

from my mac, I have never managed to get this pop-up (event after deletion and complete reinstall) but when we compile on the windows, it does pop-up …

That’s weird.
Do you test it on real devices or emulators?

yes really strange… I test on real device. This is driving me nuts !

Could you check the target Android version when building on the mac?
If it has an API level lower than Android 6.0 (the version permissions where introduced), it could be that.

Thanks helping,

do you mean this in the manifest.xml ?

 <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="25" />

    <supports-screens
        android:anyDensity="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:resizeable="true"
        android:smallScreens="true"
        android:xlargeScreens="true" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <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" />

    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />
    <uses-feature android:name="android.hardware.location" />
    <uses-feature android:name="android.hardware.location.gps" />

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

I have only the following option in the general/application/

20

But no pop-up after installation of the app…

And does the positioning return data? Even when you didn’t get the popup?

no, I do not get position data.

Have you tried reinstalling the platforms + node_modules on the mac?
Maybe something went wrong a long time ago and it showing now

ok MattE, I reinstall all from scratch, and now this is also working on my mac…make no sense to rm/add all the time platform, plugins, etc… but this is now working again
thanks for your help.

1 Like

could you tic your post as solution? so that it’s easy to see that your problem is solved.:upside_down_face: