Library | License | Description | Status | Fully offline support |
---|---|---|---|---|
MapLibre Native | BSD 2-Clause | Interactive vector tile maps for iOS, Android and other platforms | Active |
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
// SPDX-License-Identifier: GPL-3.0-or-later | |
// | |
// This file is part of MBCompass (https://github.com/CompassMB/MBCompass) | |
// | |
// Licensed under the GNU General Public License v3 or later. | |
// See the LICENSE.txt file for details. | |
package com.mubarak.mbcompass.ui.location | |
import androidx.activity.compose.LocalActivity |
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
class AndroidSensorEventListener( | |
private val context: Context | |
) : SensorEventListener { | |
private val accelerometerReading = FloatArray(3) | |
private val magnetometerReading = FloatArray(3) | |
private val rotationMatrix = FloatArray(9) | |
private val adjustedRotationMatrix = FloatArray(9) | |
private val orientationAngles = FloatArray(3) |
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
val calendar = Calendar.getInstance() | |
calendar.set(Calendar.HOUR_OF_DAY, YOUR_CURRENT_HOUR) | |
calendar.set(Calendar.MINUTE, YOUR_CURRENT_MINUTE) | |
calendar.set(Calendar.SECOND, 0) | |
val timeInMillis = calendar.timeInMillis |
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
package com.mubarak.madexample | |
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.ExperimentalCoroutinesApi | |
import kotlinx.coroutines.test.TestDispatcher | |
import kotlinx.coroutines.test.UnconfinedTestDispatcher | |
import kotlinx.coroutines.test.resetMain | |
import kotlinx.coroutines.test.setMain | |
import org.junit.rules.TestWatcher | |
import org.junit.runner.Description |
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
package com.mubarak.madexample.ui.note | |
import androidx.lifecycle.LiveData | |
import androidx.lifecycle.MutableLiveData | |
import androidx.lifecycle.ViewModel | |
import androidx.lifecycle.asLiveData | |
import androidx.lifecycle.map | |
import androidx.lifecycle.viewModelScope | |
import com.mubarak.madexample.R | |
import com.mubarak.madexample.data.sources.NoteRepository |
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
package com.mubarak.madexample.ui.note | |
import androidx.arch.core.executor.testing.InstantTaskExecutorRule | |
import com.google.common.truth.Truth.assertThat | |
import com.mubarak.madexample.MainCoroutineRule | |
import com.mubarak.madexample.data.repository.FakeNoteRepository | |
import com.mubarak.madexample.data.sources.datastore.FakeUserPreference | |
import com.mubarak.madexample.data.sources.local.model.Note | |
import com.mubarak.madexample.getOrAwaitValue | |
import com.mubarak.madexample.utils.NoteLayout |