roam-ai/roam-android

No LocationReceiver updates when running Example app

askirk opened this issue · 8 comments

I've cloned the repo, entered my SDK key and I'm able run the Example app and hit "Start tracking". My issue is that I don't see any location updates come in through the LocationReceiver class, which is where I expected to see them. Here's my stacktrace when I opened the app, created a user, and hit "Start tracking":

2021-06-17 11:45:20.312 3885-3885/com.roam.example E/Roam UserId: 60cb98408ce7db281771541a
2021-06-17 11:45:20.629 3885-3885/com.roam.example E/GS402: Publish & Subscribe is stopped
2021-06-17 11:45:20.629 3885-3885/com.roam.example E/GS402: Publish & Subscribe is stopped
2021-06-17 11:45:22.107 3885-6166/com.roam.example I/Roam: MQTT client connected
2021-06-17 11:45:27.739 3885-3885/com.roam.example I/Roam: Tracking Started

Hi @askirk, our team should get back to you ASAP.

I've cloned the repo, entered my SDK key and I'm able run the Example app and hit "Start tracking". My issue is that I don't see any location updates come in through the LocationReceiver class, which is where I expected to see them. Here's my stacktrace when I opened the app, created a user, and hit "Start tracking":

2021-06-17 11:45:20.312 3885-3885/com.roam.example E/Roam UserId: 60cb98408ce7db281771541a
2021-06-17 11:45:20.629 3885-3885/com.roam.example E/GS402: Publish & Subscribe is stopped
2021-06-17 11:45:20.629 3885-3885/com.roam.example E/GS402: Publish & Subscribe is stopped
2021-06-17 11:45:22.107 3885-6166/com.roam.example I/Roam: MQTT client connected
2021-06-17 11:45:27.739 3885-3885/com.roam.example I/Roam: Tracking Started

Hey @askirk

Thanks for writing to us. We have updated the Example application (#3 ) with our latest SDK version. 0.0.2
Request to pull the latest code and check again.

Thanks.

After pulling the latest commit, I'm still having the same issue. No location updates

After pulling the latest commit, I'm still having the same issue. No location updates

Can you let us know which tracking mode was selected?

I used "Time between location" since I'm not moving around. Based on the code I thought that would update every 30s

@askirk I have tested the code myself, I have moved our Publish and Subcribe methods to startTracking methods too, which will ensure that the publish and subscribe is enabled.(if they are not enabled while create or get user)

You can pull the recent commit 818510f

Request to try the time based tracking as I have set the time interval to 5 sec for faster testing.

Screenshot 2021-06-18 at 11 15 29 PM

After pulling, now I see them! Thank you. From the documentation it wasn't clear that subscribing to location like below was necessary to get location updates.

Roam.subscribe(Roam.Subscribe.LOCATION, roamUser.getUserId());

Thanks for the feedback @askirk!