Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device Coordinates #123

Open
evilthreads669966 opened this issue Apr 16, 2021 · 4 comments
Open

Device Coordinates #123

evilthreads669966 opened this issue Apr 16, 2021 · 4 comments

Comments

@evilthreads669966
Copy link

I've executed an authenticated request to get a list of devices in the database. Now, I need to get the coordinates. The API documentation says that I can attain the real-time coordinates by performing a search using each device's serial number. However, I am unable to find any example and/or instructions on how to do so. I've been looking at your source code. The thing is that there is no information provided to the developer when programming with your api in the IDE. What class do I use to perform this search. Am I still supposed to use a search parameters builder?

@evilthreads669966
Copy link
Author

I've found this
https://github.com/Geotab/sdk/blob/master/src/software/api/samples/device-location/sample.js
I need to create a search object in Java. I'll figure it out but it doesn't show how to create that object with the device id

@evilthreads669966
Copy link
Author

Nevermind I guess the best way is to attain the log record for the serial number. Okay sorry. Thank you. Does the log record for a device contain the most up to date GPS coordinates?

@evilthreads669966
Copy link
Author

evilthreads669966 commented Apr 16, 2021

        val logResponse = api.call(logRequest, LogRecordListResponse::class.java)
        logResponse.get().forEach {
            println(it.latitude)
            println(it.longitude)
        }
Caused by: java.lang.NullPointerException: WebServerInvoker exception in a call to '{Get}': '{NullReferenceException} {Object reference not set to an instance of an object.}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant