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

Permission Issue - ACCESS_COARSE_LOACTION provided only #130

Open
shubh261096 opened this issue Nov 21, 2024 · 0 comments
Open

Permission Issue - ACCESS_COARSE_LOACTION provided only #130

shubh261096 opened this issue Nov 21, 2024 · 0 comments

Comments

@shubh261096
Copy link

My app crashes if the only permission I provide is ACCESS_COARSE_LOACTION, I don't need FINE_LOCATION. Does it mean your library won't work if only need COARSE LOCATION?

Configuration

awesomeConfiguration = LocationConfiguration.Builder()
                .keepTracking(false)
                .askForPermission(
                    PermissionConfiguration.Builder()
                        .requiredPermissions(arrayOf(permission.ACCESS_COARSE_LOCATION))
                        .build()
                )
                .useGooglePlayServices(
                    GooglePlayServicesConfiguration.Builder()
                        .fallbackToDefault(true)
                        .askForGooglePlayServices(false)
                        .askForSettingsApi(true)
                        .failOnSettingsApiSuspended(false)
                        .ignoreLastKnowLocation(false)
                        .setWaitPeriod(20 * 1000)
                        .build()
                )
                .useDefaultProviders(
                    DefaultProviderConfiguration.Builder()
                        .requiredTimeInterval((5 * 60 * 1000).toLong())
                        .requiredDistanceInterval(0)
                        .acceptableAccuracy(5.0f)
                        .acceptableTimePeriod((5 * 60 * 1000).toLong())
                        .gpsMessage("Turn on GPS?")
                        .setWaitPeriod(ProviderType.GPS, (20 * 1000).toLong())
                        .setWaitPeriod(ProviderType.NETWORK, (20 * 1000).toLong())
                        .build()
                )
                .build()

Logs

FATAL EXCEPTION: main
                                                                                   Process: com.perfios.sdui, PID: 12160
                                                                                   java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.FusedLocationProviderClient, but class was expected (declaration of 'com.google.android.gms.location.FusedLocationProviderClient' appears in /data/app/~~JEOry2m3bVundUVql6iXzg==/com.perfios.sdui-IDCfYYhpEiXPgt_Bdp9isw==/base.apk!classes24.dex)
                                                                                   	at com.yayandroid.locationmanager.providers.locationprovider.GooglePlayServicesLocationSource.requestLastLocation(GooglePlayServicesLocationSource.java:87)
                                                                                   	at com.yayandroid.locationmanager.providers.locationprovider.GooglePlayServicesLocationProvider.get(GooglePlayServicesLocationProvider.java:81)
                                                                                   	at com.yayandroid.locationmanager.providers.locationprovider.DispatcherLocationProvider.getLocationFromGooglePlayServices(DispatcherLocationProvider.java:212)
                                                                                   	at com.yayandroid.locationmanager.providers.locationprovider.DispatcherLocationProvider.checkGooglePlayServicesAvailability(DispatcherLocationProvider.java:127)
                                                                                   	at com.yayandroid.locationmanager.providers.locationprovider.DispatcherLocationProvider.get(DispatcherLocationProvider.java:107)
                                                                                   	at com.yayandroid.locationmanager.LocationManager.permissionGranted(LocationManager.java:255)
                                                                                   	at com.yayandroid.locationmanager.LocationManager.onPermissionsGranted(LocationManager.java:266)
                                                                                   	at com.yayandroid.locationmanager.providers.permissionprovider.DefaultPermissionProvider.onRequestPermissionsResult(DefaultPermissionProvider.java:56)
                                                                                   	at com.yayandroid.locationmanager.LocationManager.onRequestPermissionsResult(LocationManager.java:193)
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

1 participant