react-native-android-location-services-dialog-box icon indicating copy to clipboard operation
react-native-android-location-services-dialog-box copied to clipboard

In debug it works but in production the alert box does not appear on Android

Open cinzianicoletti opened this issue 5 years ago • 2 comments

I have this abnormal problem. When I compile the application in debug mode everything works in the correct mode. The moment I create the apk and publish it for online tests, the alert to activate the GPS no longer appears. Anyone know what it is? Here the specifications:

React Native Environment Info:
  System:
    OS: macOS 10.15.4
    CPU: (4) x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
    Memory: 74.91 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 13.8.0 - /usr/local/bin/node
    Yarn: 1.22.0 - ~/.yarn/bin/yarn
    npm: 6.13.7 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
  IDEs:
    Android Studio: 3.6 AI-192.7142.36.36.6392135
    Xcode: 11.3.1/11C505 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.6.3 => 16.6.3 
    react-native: 0.59.8 => 0.59.8 
  npmGlobalPackages:
    react-native-cli: 2.0.1
    react-native: 0.61.5

I thank in advance who will want to help me.

cinzianicoletti avatar May 25 '20 08:05 cinzianicoletti

@nicolettinzia how did you solve this ?

kukuandroid avatar Nov 08 '20 05:11 kukuandroid

check this out: https://github.com/facebook/react-native/issues/10009#issuecomment-347839488

try setTimeout or a delay function before trying to access the Android API.

const delay = ms => new Promise(res => setTimeout(res, ms));
await delay(5000);

theInfiTualEr avatar Sep 13 '23 06:09 theInfiTualEr