All Projects → icerockdev → moko-geo

icerockdev / moko-geo

Licence: Apache-2.0 license
Geolocation access for mobile (android & ios) Kotlin Multiplatform development

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to moko-geo

moko-graphics
Graphics primitives for mobile (android & ios) Kotlin Multiplatform development
Stars: ✭ 11 (-73.17%)
Mutual labels:  kotlin-native, kotlin-multiplatform, moko
moko-network
Network components with codegeneration of rest api for mobile (android & ios) Kotlin Multiplatform development
Stars: ✭ 107 (+160.98%)
Mutual labels:  kotlin-native, kotlin-multiplatform, moko
moko-web3
Ethereum Web3 implementation for mobile (android & ios) Kotlin Multiplatform development
Stars: ✭ 32 (-21.95%)
Mutual labels:  kotlin-native, kotlin-multiplatform, moko
moko-maps
Control your map from common code for mobile (android & ios) Kotlin Multiplatform development
Stars: ✭ 47 (+14.63%)
Mutual labels:  kotlin-native, kotlin-multiplatform, moko
StarWars
Minimal GraphQL based Jetpack Compose, Wear Compose and SwiftUI Kotlin Multiplatform sample (using StarWars endpoint - https://graphql.org/swapi-graphql)
Stars: ✭ 165 (+302.44%)
Mutual labels:  kotlin-native, kotlin-multiplatform, kotlin-multiplatform-mobile
MultiplatformPlayground
Kotlin Multiplatform project in Jetpack Compose & SwiftUI with shared ViewModel layer and File upload
Stars: ✭ 72 (+75.61%)
Mutual labels:  kotlin-native, kotlin-multiplatform, moko
CompleteKotlin
Gradle Plugin to enable auto-completion and symbol resolution for all Kotlin/Native platforms.
Stars: ✭ 236 (+475.61%)
Mutual labels:  kotlin-native, kotlin-multiplatform, kotlin-multiplatform-mobile
moko-errors
Automated exceptions handler for mobile (android & ios) Kotlin Multiplatform development.
Stars: ✭ 45 (+9.76%)
Mutual labels:  kotlin-native, kotlin-multiplatform, moko
SQLiter
Minimal multiplatform sqlite library
Stars: ✭ 120 (+192.68%)
Mutual labels:  kotlin-native, kotlin-multiplatform
cognito-idp
Lightweight AWS Cognito Identity Provider client for Kotlin Multiplatform and Typescript projects.
Stars: ✭ 14 (-65.85%)
Mutual labels:  kotlin-native, kotlin-multiplatform
kotlin-multiplatform-example
A Kotlin multiplatform example app that targets Android, ReactJS, iOS, JavaFx, and Spring Boot
Stars: ✭ 115 (+180.49%)
Mutual labels:  kotlin-native, kotlin-multiplatform
thelema-engine
Thelema - 3D graphics engine, written in Kotlin. Based on sources of libGDX.
Stars: ✭ 51 (+24.39%)
Mutual labels:  kotlin-native, kotlin-multiplatform
koru
Simple coroutine wrappers for Kotlin Native. Generated from annotations. Compatible with RxSwift, Combine etc.
Stars: ✭ 141 (+243.9%)
Mutual labels:  kotlin-native, kotlin-multiplatform
kinsight-multiplatform
Kotlin Multiplatform Concept - iOS, MacOS, WatchOS (SwiftUI), Android (phone and Wear OS), JVM Web Server - Alpha Capture
Stars: ✭ 38 (-7.32%)
Mutual labels:  kotlin-native, kotlin-multiplatform
kgql
GraphQL Document wrapper generator for Kotlin Multiplatform Project and Android
Stars: ✭ 54 (+31.71%)
Mutual labels:  kotlin-native, kotlin-multiplatform
KotlinMultiplatformAndoridParcelize
Use the Parcelize Annotation of the Kotlin Android Extensions in Kotin Multiplatform projects
Stars: ✭ 16 (-60.98%)
Mutual labels:  kotlin-native, kotlin-multiplatform
chip-8
Jetpack Compose and SwiftUI based Kotlin Multiplatform fork of https://github.com/cbeust/chip-8 (Chip-8 Emulator)
Stars: ✭ 36 (-12.2%)
Mutual labels:  kotlin-native, kotlin-multiplatform
Arbor
Like Timber, just different
Stars: ✭ 55 (+34.15%)
Mutual labels:  kotlin-native, kotlin-multiplatform
tmdb-api
This Kotlin Multiplatform library is for accessing the TMDB API to get movie and TV show content. Using for Android, iOS, and JS projects.
Stars: ✭ 31 (-24.39%)
Mutual labels:  kotlin-native, kotlin-multiplatform
libs.kmp.icerock.dev
Kotlin Multiplatform libraries list with info auto-fetch
Stars: ✭ 178 (+334.15%)
Mutual labels:  kotlin-native, kotlin-multiplatform

moko-mvvm
GitHub license Download kotlin-version

Mobile Kotlin geolocation module

This is a Kotlin Multiplatform library that provides geolocation to common code.

Table of Contents

Features

  • Geolocation tracking - track user geolocation from common code;
  • Compose Multiplatform support;

Requirements

  • Gradle version 6.0+
  • Android API 16+
  • iOS version 9.0+

Installation

root build.gradle

allprojects {
    repositories {
        mavenCentral()
    }
}

project build.gradle

dependencies {
    commonMainApi("dev.icerock.moko:geo:0.6.0")

    // Compose Multiplatform
    commonMainApi("dev.icerock.moko:geo-compose:0.6.0")
}

Usage

in common code:

class TrackerViewModel(
    val locationTracker: LocationTracker
) : ViewModel() {

    init {
        viewModelScope.launch {
            locationTracker.getLocationsFlow()
                .distinctUntilChanged()
                .collect { println("new location: $it") }
        }
    }

    fun onStartPressed() {
        viewModelScope.launch { locationTracker.startTracking() }
    }

    fun onStopPressed() {
        locationTracker.stopTracking()
    }
}

In Android:

// create ViewModel
val locationTracker = LocationTracker(
    permissionsController = PermissionsController(applicationContext = applicationContext)
)
val viewModel = TrackerViewModel(locationTracker)

// bind tracker to lifecycle
viewModel.locationTracker.bind(lifecycle, this, supportFragmentManager)

In iOS:

let viewModel = TrackerViewModel(
    locationTracker: LocationTracker(
        permissionsController: PermissionsController(),
        accuracy: kCLLocationAccuracyBest
    )
)

Samples

Please see more examples in the sample directory.

Set Up Locally

  • The geo directory contains the geo library;
  • In sample directory contains sample apps for Android and iOS; plus the mpp-library connected to the apps.

Contributing

All development (both new features and bug fixes) is performed in the develop branch. This way master always contains the sources of the most recently released version. Please send PRs with bug fixes to the develop branch. Documentation fixes in the markdown files are an exception to this rule. They are updated directly in master.

The develop branch is pushed to master on release.

For more details on contributing please see the contributing guide.

License

Copyright 2019 IceRock MAG Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].