Git Product home page Git Product logo

fused-location-api-example's Issues

Issues with dependency versions

Hello,

I'm trying to use your code, however I'm getting issues with some versions in the dependencies, can someone help me out here?

e: C:/Users/user/.gradle/caches/transforms-2/files-2.1/7980168ed644bcd1d1c470386ac7a470/jetified-kotlin-stdlib-1.5.10.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16. e: C:/Users/user/.gradle/caches/transforms-2/files-2.1/94de443224b407a2011360fdde6bd78b/jetified-core-ktx-1.6.0-api.jar!/META-INF/core-ktx_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16. e: C:/Users/user/.gradle/caches/transforms-2/files-2.1/c59da2ac229afacb8c7416996b012d0d/jetified-kotlin-stdlib-common-1.5.10.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
defaultConfig {
applicationId "com.example.myapp"
minSdkVersion 19
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.android.gms:play-services-location:18.0.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.google.android.gms:play-services-location:18.0.0'
implementation 'com.github.kittinunf.fuel:fuel:2.3.1' //Core package
implementation 'com.github.kittinunf.fuel:fuel-android:2.2.1' //Android
implementation 'com.github.kittinunf.fuel:fuel-gson:2.2.1' //Fuel Gson
implementation 'com.google.code.gson:gson:2.8.6' //Gson
implementation 'com.github.kittinunf.fuel:fuel:2.3.1'
}

Background Location Update

In the foreground, the app works beautifully, but as soon as I make the app go to the background, the location updates don't get triggered at all. Have added ACCESS_BACKGROUND_LOCATION permission in Manifest and I'm requesting ACCESS_BACKGROUND_LOCATION permission on App Launch.

Android Manifest
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />

PermissionUtils

fun requestAccessFineLocationPermission(activity: AppCompatActivity, requestId: Int) { ActivityCompat.requestPermissions( activity, arrayOf( Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_BACKGROUND_LOCATION ), requestId ) }

Am i missing anything here ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.