8000 Unablet to use the location example code, no other documentation provided. · Issue #883 · splendo/kaluga · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

8000 Unablet to use the location example code, no other documentation provided. #883

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

Open
mcpierce opened this issue May 13, 2025 · 1 comment

Comments

@mcpierce
Copy link

Describe the bug
There is no default constructor for LocationStateRepoBuilder which means my project is unable to use the code.

To Reproduce
Steps to reproduce the behavior:

  1. Added the dependencies to libs.versions.toml:
kaluga-version = "1.5.1"
...
kaluga-location-permissions = { group = "com.splendo.kaluga", name = "location-permissions", version.ref = "kaluga-version" }
kaluga-location = { group = "com.splendo.kaluga", name = "location", version.ref = "kaluga-version" }
...
[bundles]
location = ["kaluga-location-permissions", "kaluga-location"]
  1. Added these to build.gradle.kts for commonMain:
        commonMain.dependencies {
            ...
            implementation(libs.bundles.location)
        }
  1. Added the following initializer to my view model:
    init {
        viewModelScope.launch(Dispatchers.IO) {
            val locationStateRepo = LocationStateRepoBuilder().create(
                Permissions.Location(
                    background = false,
                    precise = true
                )
            )
            locationStateRepo.flow().location().collect { location ->
                _location.emit(
                    Location(
                        it.coordinates.latitude,
                        it.coordinates.longitude,
                        it.altitude?.meters
                    )
                );
            }
        }
    }
  1. Attempting to compile this results in the following error output:
e: file:///Users/darryl_pierce/Repositories/nogeo/nogeo-mobile/shared/src/commonMain/kotlin/app/nogeo/mobile/viewmodel/LocationViewModel.kt:23:61 No value passed for parameter 'locationManagerBuilder'.
Ask Gemini

e: file:///Users/darryl_pierce/Repositories/nogeo/nogeo-mobile/shared/src/commonMain/kotlin/app/nogeo/mobile/viewmodel/LocationViewModel.kt:23:61 No value passed for parameter 'permissionsBuilder'.
Ask Gemini

Expected behavior

  1. Example code should compile when used.

Screenshots

Image

@mcpierce mcpierce changed the title Unablet o use the location code. Unablet to use the location example code, no other documentation provided. May 13, 2025
@thoutbeckers
Copy link
Collaborator

Apologies, documentation is out of date.

The example app has a location example.

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

2 participants
0