-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2492c2a
commit f27f165
Showing
3 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
calf-geo/src/desktopMain/kotlin/com/mohamedrejeb/calf/geo/LocationTracker.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.mohamedrejeb.calf.geo | ||
|
||
import androidx.compose.runtime.MutableState | ||
import androidx.compose.runtime.State | ||
import androidx.compose.runtime.mutableStateOf | ||
|
||
actual class LocationTracker { | ||
actual suspend fun startTracking() { | ||
println("startTracking") | ||
} | ||
|
||
actual fun stopTracking() { | ||
println("stopTracking") | ||
} | ||
|
||
private val _locationState: MutableState<LatLng> = mutableStateOf(LatLng(0.0, 0.0)) | ||
actual val locationState: State<LatLng> = _locationState | ||
|
||
private val _extendedLocationState = mutableStateOf( | ||
ExtendedLocation( | ||
location = Location( | ||
coordinates = LatLng(0.0, 0.0), | ||
coordinatesAccuracyMeters = 0.0 | ||
), | ||
azimuth = Azimuth( | ||
azimuthDegrees = 0.0, | ||
azimuthAccuracyDegrees = null | ||
), | ||
speed = Speed( | ||
speedMps = 0.0, | ||
speedAccuracyMps = null | ||
), | ||
altitude = Altitude( | ||
altitudeMeters = 0.0, | ||
altitudeAccuracyMeters = null | ||
), | ||
timestampMs = 0L | ||
) | ||
) | ||
actual val extendedLocationState: State<ExtendedLocation> = _extendedLocationState | ||
} |
41 changes: 41 additions & 0 deletions
41
calf-geo/src/iosMain/kotlin/com.mohamedrejeb.calf/geo/LocationTracker.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.mohamedrejeb.calf.geo | ||
|
||
import androidx.compose.runtime.MutableState | ||
import androidx.compose.runtime.State | ||
import androidx.compose.runtime.mutableStateOf | ||
|
||
actual class LocationTracker { | ||
actual suspend fun startTracking() { | ||
println("startTracking") | ||
} | ||
|
||
actual fun stopTracking() { | ||
println("stopTracking") | ||
} | ||
|
||
private val _locationState: MutableState<LatLng> = mutableStateOf(LatLng(0.0, 0.0)) | ||
actual val locationState: State<LatLng> = _locationState | ||
|
||
private val _extendedLocationState = mutableStateOf( | ||
ExtendedLocation( | ||
location = Location( | ||
coordinates = LatLng(0.0, 0.0), | ||
coordinatesAccuracyMeters = 0.0 | ||
), | ||
azimuth = Azimuth( | ||
azimuthDegrees = 0.0, | ||
azimuthAccuracyDegrees = null | ||
), | ||
speed = Speed( | ||
speedMps = 0.0, | ||
speedAccuracyMps = null | ||
), | ||
altitude = Altitude( | ||
altitudeMeters = 0.0, | ||
altitudeAccuracyMeters = null | ||
), | ||
timestampMs = 0L | ||
) | ||
) | ||
actual val extendedLocationState: State<ExtendedLocation> = _extendedLocationState | ||
} |
41 changes: 41 additions & 0 deletions
41
calf-geo/src/jsMain/kotlin/com.mohamedrejeb.calf/geo/LocationTracker.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.mohamedrejeb.calf.geo | ||
|
||
import androidx.compose.runtime.MutableState | ||
import androidx.compose.runtime.State | ||
import androidx.compose.runtime.mutableStateOf | ||
|
||
actual class LocationTracker { | ||
actual suspend fun startTracking() { | ||
println("startTracking") | ||
} | ||
|
||
actual fun stopTracking() { | ||
println("stopTracking") | ||
} | ||
|
||
private val _locationState: MutableState<LatLng> = mutableStateOf(LatLng(0.0, 0.0)) | ||
actual val locationState: State<LatLng> = _locationState | ||
|
||
private val _extendedLocationState = mutableStateOf( | ||
ExtendedLocation( | ||
location = Location( | ||
coordinates = LatLng(0.0, 0.0), | ||
coordinatesAccuracyMeters = 0.0 | ||
), | ||
azimuth = Azimuth( | ||
azimuthDegrees = 0.0, | ||
azimuthAccuracyDegrees = null | ||
), | ||
speed = Speed( | ||
speedMps = 0.0, | ||
speedAccuracyMps = null | ||
), | ||
altitude = Altitude( | ||
altitudeMeters = 0.0, | ||
altitudeAccuracyMeters = null | ||
), | ||
timestampMs = 0L | ||
) | ||
) | ||
actual val extendedLocationState: State<ExtendedLocation> = _extendedLocationState | ||
} |