Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PoPup does not come in Android 10 version mobiles. #48

Open
amit13091992 opened this issue Jul 29, 2020 · 3 comments
Open

PoPup does not come in Android 10 version mobiles. #48

amit13091992 opened this issue Jul 29, 2020 · 3 comments

Comments

@amit13091992
Copy link

While using this library, the pop up doesn't come in Android OS 10.
Tried in below devices:

Samsung M21
Poco X2

Can you please resolve or guide about this issue ASAP. Thanks

@Richou
Copy link
Owner

Richou commented Aug 20, 2020

I can not reproduce this bug.
I don't have those devices, so I tried on emulators :
Nexus 5X API 29
Pixel XL API 30
It worked on both, do you have the same issue, with emulator or other devices ?

@amit13091992
Copy link
Author

@Richou
Can you try it on real devices because many times, in emulator the location does not work properly.

@guitorioadar
Copy link

The system considers your app to be using foreground location if a feature of your app accesses the device's current location in one of the following situations:

An activity that belongs to your app is visible.
Your app is running a foreground service. When a foreground service is running, the system raises user awareness by showing a persistent notification. Your app retains access when it's placed in the background, such as when the user presses the Home button on their device or turns their device's display off.

Additionally, it's recommended that you declare a foreground service type of location, as shown in the following code snippet. On Android 10 (API level 29) and higher, you must declare this foreground service type.

<!-- Recommended for Android 9 (API level 28) and lower. -->
<!-- Required for Android 10 (API level 29) and higher. -->
<service
    android:name="MyNavigationService"
    android:foregroundServiceType="location" ... >
    <!-- Any inner elements would go here. -->
</service>
<manifest ... >
  <!-- To request foreground location access, declare one of these permissions. -->
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
</manifest>

On Android 10 (API level 29) and higher, you must declare the ACCESS_BACKGROUND_LOCATION permission in your app's manifest in order to request background location access at runtime. On earlier versions of Android, when your app receives foreground location access, it automatically receives background location access as well.

<manifest ... >
  <!-- Required only when requesting background location access on
       Android 10 (API level 29) and higher. -->
  <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
</manifest>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants