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


#1

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

#2

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.


#3

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 …


#4

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


#5

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


#6

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.


#7

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" />

#8

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

But no pop-up after installation of the app…


#9

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


#10

no, I do not get position data.


#11

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


#12

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.


#13

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