LocationManager icon indicating copy to clipboard operation
LocationManager copied to clipboard

ACCESS_BACKGROUND_LOCATION example?

Open icyield opened this issue 3 years ago • 2 comments

Thanks for the library.

Have you an example of using the library to allow ACCESS_BACKGROUND_LOCATION?

icyield avatar Apr 27 '21 11:04 icyield

Have you tried within a service / workmanager with a configuration something link the following?

LocationConfiguration awesomeConfiguration = new LocationConfiguration.Builder()
    .keepTracking(true)
    .askForPermission(
         new PermissionConfiguration.Builder()
             .requiredPermissions(
                  new String[] { permission.ACCESS_FINE_LOCATION, permission.ACCESS_BACKGROUND_LOCATION }
             )
        .build()
     )
    .useGooglePlayServices(new GooglePlayServicesConfiguration.Builder().build())
    .useDefaultProviders(new DefaultProviderConfiguration.Builder().build())
    .build();

yayaa avatar Feb 27 '22 11:02 yayaa

Happy to accept PR for the example if you build :)

yayaa avatar Feb 27 '22 12:02 yayaa