This file contains hidden or 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
    
  
  
    
  | import android.content.Context | |
| import android.hardware.Sensor | |
| import android.hardware.SensorManager | |
| import android.os.Build | |
| import androidx.compose.runtime.Composable | |
| import androidx.compose.runtime.remember | |
| import androidx.compose.ui.platform.LocalContext | |
| sealed class SensorType(val name: String) { | |
| object Accelerometer : SensorType(name = "Accelerometer") | 
  
    
      This file contains hidden or 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
    
  
  
    
  | import android.content.Context | |
| import android.hardware.Sensor | |
| import android.hardware.SensorEvent | |
| import android.hardware.SensorEventListener | |
| import android.hardware.SensorManager | |
| import android.hardware.TriggerEvent | |
| import android.hardware.TriggerEventListener | |
| import androidx.compose.runtime.Composable | |
| import androidx.compose.runtime.DisposableEffect | |
| import androidx.compose.runtime.Immutable | 
  
    
      This file contains hidden or 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
    
  
  
    
  | import android.hardware.SensorManager | |
| enum class SensorDelay { | |
| Fastest, | |
| Game, | |
| UI, | |
| Normal; | |
| internal fun toAndroidSensorDelay(): Int { | |
| return when (this) { | 
  
    
      This file contains hidden or 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
    
  
  
    
  | import android.annotation.SuppressLint | |
| import androidx.compose.animation.core.tween | |
| import androidx.compose.foundation.ExperimentalFoundationApi | |
| import androidx.compose.foundation.isSystemInDarkTheme | |
| import androidx.compose.foundation.layout.Arrangement | |
| import androidx.compose.foundation.layout.BoxWithConstraints | |
| import androidx.compose.foundation.layout.Row | |
| import androidx.compose.foundation.layout.fillMaxHeight | |
| import androidx.compose.foundation.layout.fillMaxWidth | |
| import androidx.compose.foundation.layout.navigationBarsPadding | 
  
    
      This file contains hidden or 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
    
  
  
    
  | private var head: MyNode2? = null | |
| var items by mutableStateOf(emptyList<Location>().toMutableList()) | |
| private val locationsFromSQLite = repo.bindGetAllLocationsFromSQLite() | |
| var locationsList by mutableStateOf(emptyList<Location>()) | |
| fun setupObservers(lifecycleOwner: LifecycleOwner) { | |
| locationsFromSQLite.observe(lifecycleOwner, Observer { | |
| locationsList = it | |
| }) | |
| } | 
  
    
      This file contains hidden or 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
    
  
  
    
  | private var head: MyNode2? = null | |
| var items by mutableStateOf(emptyList<Location>().toMutableList()) | |
| private val locationsFromSQLite = repo.getLocationsFromSQLite() | |
| var locationsList by mutableStateOf(emptyList<Location>()) | |
| private fun checkIfLinkedListIsEmpty(): Boolean { | |
| return head == null | |
| } | |
| fun setupObservers(lifecycleOwner: LifecycleOwner) { | |
| locationsFromSQLite.observe(lifecycleOwner, Observer { | 
  
    
      This file contains hidden or 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
    
  
  
    
  | fun createNodeStructureOfExistingData() { | |
| for (location in locationsList) { | |
| insertAtLast(location) | |
| if (location.location_id == 5000) break | |
| } | |
| } | |
| private fun itemsList() { | |
| var trav: MyNode? = head | |
| items.clear() |