<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Route Tracker not receiving TrackingStatusChangedListener in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/route-tracker-not-receiving/m-p/1282288#M6021</link>
    <description>&lt;P&gt;Thanks for posting this Anna! I have literally spent the better part of a whole day and a half trying to debug and track down code that caused my app to break.&lt;BR /&gt;&lt;BR /&gt;From the sound of things, the app you're building is similar to what I am developing as your posts reflect similar challenges. This post helped me to resolve my issue. As soon as I removed the lite key, I was back to a working app.... with a ton of additional 'debug' code that I can now get rid of. Kudos to you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Sean&lt;/P&gt;</description>
    <pubDate>Tue, 25 Apr 2023 13:53:48 GMT</pubDate>
    <dc:creator>smithse</dc:creator>
    <dc:date>2023-04-25T13:53:48Z</dc:date>
    <item>
      <title>Route Tracker not receiving TrackingStatusChangedListener</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/route-tracker-not-receiving/m-p/1214132#M5849</link>
      <description>&lt;P&gt;Hello, I'm working on a navigation app. I've done my app based on 'Navigate a route' and 'Navigate in AR samples'. I've managed to calculate and display a route, but when I'm trying to navigate, routeTracker is not receiving any callbacks from TrackingStatusChangedListener and trackingStatus is constantly null.&lt;/P&gt;&lt;P&gt;This is how I'm inititating routeTracker and providing it with current location.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;routeTracker &lt;/SPAN&gt;= RouteTracker(&lt;SPAN&gt;activity&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;routeResult&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, true&lt;/SPAN&gt;)&lt;BR /&gt;&lt;SPAN&gt;val &lt;/SPAN&gt;trackingLocationDataSource = AndroidLocationDataSource(&lt;SPAN&gt;activity&lt;/SPAN&gt;)&lt;BR /&gt;trackingLocationDataSource.addLocationChangedListener &lt;SPAN&gt;{ &lt;/SPAN&gt;locationChangedEvent &lt;SPAN&gt;-&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    routeTracker&lt;/SPAN&gt;.trackLocationAsync(locationChangedEvent.&lt;SPAN&gt;location&lt;/SPAN&gt;)&lt;BR /&gt;&lt;SPAN&gt;}&lt;BR /&gt;&lt;/SPAN&gt;trackingLocationDataSource.startAsync()&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I've also tried like this:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;routeTracker &lt;/SPAN&gt;= RouteTracker(&lt;SPAN&gt;activity&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;routeResult&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, true&lt;/SPAN&gt;)&lt;BR /&gt;mapView.&lt;SPAN&gt;locationDisplay&lt;/SPAN&gt;.addLocationChangedListener &lt;SPAN&gt;{ &lt;/SPAN&gt;locationChangedEvent &lt;SPAN&gt;-&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;routeTracker&lt;/SPAN&gt;.trackLocationAsync(locationChangedEvent.&lt;SPAN&gt;location&lt;/SPAN&gt;)&lt;BR /&gt;&lt;SPAN&gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;I even made SimulatedLocationDataSource. When I made it like in sample (Navigate a route) locationDisplay didn't appear:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;val &lt;/SPAN&gt;simulationParameters = SimulationParameters(Calendar.getInstance()&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;35.0&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;5.0&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;5.0&lt;/SPAN&gt;)&lt;BR /&gt;&lt;SPAN&gt;val &lt;/SPAN&gt;simulatedLocationDataSource = SimulatedLocationDataSource().apply &lt;SPAN&gt;{ &lt;/SPAN&gt;setLocations(routeGeometry&lt;SPAN&gt;, &lt;/SPAN&gt;simulationParameters) &lt;SPAN&gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;val &lt;/SPAN&gt;routeTrackerLocationDataSource = RouteTrackerLocationDataSource(&lt;SPAN&gt;routeTracker&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;simulatedLocationDataSource)&lt;BR /&gt;mapView.&lt;SPAN&gt;locationDisplay&lt;/SPAN&gt;.&lt;SPAN&gt;locationDataSource &lt;/SPAN&gt;= routeTrackerLocationDataSource&lt;BR /&gt;mapView.&lt;SPAN&gt;locationDisplay&lt;/SPAN&gt;.addLocationChangedListener &lt;SPAN&gt;{ &lt;/SPAN&gt;locationChangedEvent &lt;SPAN&gt;-&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;routeTracker&lt;/SPAN&gt;.trackLocationAsync(locationChangedEvent.&lt;SPAN&gt;location&lt;/SPAN&gt;)&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;But wen I made it like this, the location was moving along the route, but routeTracker still didn't receive any callbacks and trackingStatus was still null:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;val &lt;/SPAN&gt;simulationParameters = SimulationParameters(Calendar.getInstance()&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;35.0&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;5.0&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;5.0&lt;/SPAN&gt;)&lt;BR /&gt;&lt;SPAN&gt;val &lt;/SPAN&gt;simulatedLocationDataSource = SimulatedLocationDataSource().apply &lt;SPAN&gt;{ &lt;/SPAN&gt;setLocations(routeGeometry&lt;SPAN&gt;, &lt;/SPAN&gt;simulationParameters) &lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;mapView.&lt;SPAN&gt;locationDisplay&lt;/SPAN&gt;.&lt;SPAN&gt;locationDataSource &lt;/SPAN&gt;= simulatedLocationDataSource &lt;BR /&gt;mapView.&lt;SPAN&gt;locationDisplay&lt;/SPAN&gt;.addLocationChangedListener &lt;SPAN&gt;{ &lt;/SPAN&gt;locationChangedEvent &lt;SPAN&gt;-&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;routeTracker&lt;/SPAN&gt;.trackLocationAsync(locationChangedEvent.&lt;SPAN&gt;location&lt;/SPAN&gt;)&lt;BR /&gt;&lt;SPAN&gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;I passed directly simulatedLocationDataSource to the locationDataSource, without creating RouteTrackerLocationDataSource. So maybe there is a problem with RouteTracker.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've created a Network Dataset using Arcgis Pro. It supports directions and everything seems to work fine with the network dataset. I'm loading it from a mobile map package. Changing network dataset from the one I created to&amp;nbsp;world routing service:&amp;nbsp;&lt;A href="https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World" target="_blank"&gt;https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World&lt;/A&gt;&amp;nbsp;also didn't help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm using 100.15.0 version.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 11:09:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/route-tracker-not-receiving/m-p/1214132#M5849</guid>
      <dc:creator>AnnaSzkibiel</dc:creator>
      <dc:date>2022-09-20T11:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Route Tracker not receiving TrackingStatusChangedListener</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/route-tracker-not-receiving/m-p/1214387#M5850</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/489108"&gt;@AnnaSzkibiel&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make sure to add the location data source to the map before calling ".startAsync()". Check out the sample app which uses&amp;nbsp;TrackingStatusChangedListener here:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-android/tree/main/kotlin/navigate-route-with-rerouting" target="_self"&gt;Navigate route with rerouting&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;// provide the route tacker with the current location of the simulated datasource&lt;BR /&gt;&lt;/SPAN&gt;simulatedLocationDataSource.&lt;SPAN&gt;addLocationChangedListener &lt;/SPAN&gt;{&lt;BR /&gt;    &lt;SPAN&gt;routeTracker&lt;/SPAN&gt;?.&lt;SPAN&gt;trackLocationAsync&lt;/SPAN&gt;(&lt;SPAN&gt;it&lt;/SPAN&gt;.&lt;SPAN&gt;location&lt;/SPAN&gt;)&lt;BR /&gt;}&lt;BR /&gt;&lt;SPAN&gt;// add a data source for the location display&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;mapView&lt;/SPAN&gt;.&lt;SPAN&gt;locationDisplay&lt;/SPAN&gt;.&lt;SPAN&gt;locationDataSource &lt;/SPAN&gt;= simulatedLocationDataSource&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;// start the location data source&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;mapView&lt;/SPAN&gt;.&lt;SPAN&gt;locationDisplay&lt;/SPAN&gt;.&lt;SPAN&gt;startAsync&lt;/SPAN&gt;()&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And set up the&amp;nbsp;addTrackingStatusChangedListener like this:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;routeTracker &lt;/SPAN&gt;= RouteTracker(&lt;SPAN&gt;activity&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;routeResult&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, true&lt;/SPAN&gt;)&lt;BR /&gt;&lt;SPAN&gt;// handle route tracking status changes&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;routeTracker&lt;/SPAN&gt;.&lt;SPAN&gt;addTrackingStatusChangedListener&lt;/SPAN&gt;(&lt;SPAN&gt;trackingStatusListener&lt;/SPAN&gt;)&lt;BR /&gt;...&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;private val &lt;/SPAN&gt;&lt;SPAN&gt;trackingStatusListener&lt;/SPAN&gt;: &lt;SPAN&gt;RouteTracker&lt;/SPAN&gt;.&lt;SPAN&gt;TrackingStatusChangedListener &lt;/SPAN&gt;=&lt;BR /&gt;    &lt;SPAN&gt;RouteTracker&lt;/SPAN&gt;.&lt;SPAN&gt;TrackingStatusChangedListener &lt;/SPAN&gt;{ t&lt;SPAN&gt;rackingStatusChangedEvent -&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;        // your code here:&lt;BR /&gt;        &lt;SPAN&gt;updateTrackingStatus&lt;/SPAN&gt;(t&lt;SPAN&gt;rackingStatusChangedEvent&lt;/SPAN&gt;.&lt;SPAN&gt;trackingStatus&lt;/SPAN&gt;)&lt;BR /&gt;    }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 21:11:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/route-tracker-not-receiving/m-p/1214387#M5850</guid>
      <dc:creator>Shubham_Sharma</dc:creator>
      <dc:date>2022-09-20T21:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: Route Tracker not receiving TrackingStatusChangedListener</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/route-tracker-not-receiving/m-p/1214632#M5851</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/476225"&gt;@Shubham_Sharma&lt;/a&gt;&amp;nbsp;for your response, but that was not the issue. I finally found out, why this wasn't working for me. I've been on a Lite license, for which navigating is restricted.&lt;/P&gt;&lt;P&gt;From my ArcGIS Online account it seems I have 'ArcGIS Runtime Advanced' license. Can I do something to get my license string?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 14:54:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/route-tracker-not-receiving/m-p/1214632#M5851</guid>
      <dc:creator>AnnaSzkibiel</dc:creator>
      <dc:date>2022-09-21T14:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Route Tracker not receiving TrackingStatusChangedListener</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/route-tracker-not-receiving/m-p/1214909#M5852</link>
      <description>&lt;P data-unlink="true"&gt;&lt;SPAN&gt;You can get the license info from their portal using this method:&lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;A href="https://developers.arcgis.com/android/api-reference/reference/com/esri/arcgisruntime/portal/Portal.html#fetchLicenseInfoAsync()" target="_blank"&gt;https://developers.arcgis.com/android/api-reference/reference/com/esri/arcgisruntime/portal/Portal.html#fetchLicenseInfoAsync()&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;BR /&gt;&lt;SPAN&gt;And then set&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;ArcGISRuntimeEnvironment.setLicense(LicenseInfo)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 00:36:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/route-tracker-not-receiving/m-p/1214909#M5852</guid>
      <dc:creator>Shubham_Sharma</dc:creator>
      <dc:date>2022-09-22T00:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Route Tracker not receiving TrackingStatusChangedListener</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/route-tracker-not-receiving/m-p/1282288#M6021</link>
      <description>&lt;P&gt;Thanks for posting this Anna! I have literally spent the better part of a whole day and a half trying to debug and track down code that caused my app to break.&lt;BR /&gt;&lt;BR /&gt;From the sound of things, the app you're building is similar to what I am developing as your posts reflect similar challenges. This post helped me to resolve my issue. As soon as I removed the lite key, I was back to a working app.... with a ton of additional 'debug' code that I can now get rid of. Kudos to you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Sean&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 13:53:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/route-tracker-not-receiving/m-p/1282288#M6021</guid>
      <dc:creator>smithse</dc:creator>
      <dc:date>2023-04-25T13:53:48Z</dc:date>
    </item>
  </channel>
</rss>

