3v1n0/GMapsParser

Instructions unclear

sharan-nyn opened this issue · 2 comments

Hi 3v1n0,

I am trying to use this for a hobby project. But I am not able to get it working.
Could you please update the readme on how to use this?
Could you please provide a standalone app example that uses this library?

Thanks,
Sharan

3v1n0 commented

Soo... I've an app in progress using it that I will publish soon hopefully, but I've not done much than this to get the library to be usable:

build.gradle:

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
}

app/build.gradle:

dependencies {
    // may use an explicit version instead
    implementation ('com.github.3v1n0.GMapsParser:navparser:master-SNAPSHOT') { changing = true }
    implementation ("com.github.3v1n0.GMapsParser:navparser-websocket:master-SNAPSHOT") { changing = true }
}

Using it should be trivial then, as done in https://github.com/3v1n0/GMapsParser/blob/master/app/src/main/AndroidManifest.xml

@3v1n0
I got it working, I stepped through the NavigationListener.kt in debug mode and found the following error:
android.content.pm.PackageManager$NameNotFoundException: Application package com.google.android.apps.maps not found
The logging using timber only happens when DEBUG is true, so it was missed by me.

The problem is with Android 11+ devices. As per https://developer.android.com/about/versions/11/privacy/package-visibility
You need to add the following in the manifest.xml:
<queries> <package android:name="com.google.android.apps.maps" /> </queries>