<?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 ExportTileCacheJob never starts in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/exporttilecachejob-never-starts/m-p/514324#M3498</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using the .Net runtime sdk (v.100) for Xamarin Android. I'm trying to download tiles as a .tpk for offline use by my mobile app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've managed to use the AuthenticationManager to give me a token for my app. I can successfully create the ExportTileCacheTask and create the ExportTileCacheJob by calling ExportTileCache on the ExportTileCacheTask, but the status of the job never seems to change.&amp;nbsp;When I check the job status immediately after the call to ExportTileCache, it is "NotStarted" and the ServerId = "". I have a breakpoint on my ExportJob_JobChanged handler and it never gets hit no matter how long I wait.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? Code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var serviceUri = new Uri("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Ftiledbasemaps.arcgis.com%2Farcgis%2Frest%2Fservices%2FWorld_Imagery%2FMapServer" rel="nofollow" target="_blank"&gt;https://tiledbasemaps.arcgis.com/arcgis/rest/services/World_Imagery/MapServer&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var tokenUri = new Uri("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com%2Fsharing%2Frest" rel="nofollow" target="_blank"&gt;https://www.arcgis.com/sharing/rest&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt; {&lt;BR /&gt; var serverInfo = new ServerInfo&lt;BR /&gt; {&lt;BR /&gt; ServerUri = tokenUri,&lt;BR /&gt; TokenAuthenticationType = TokenAuthenticationType.OAuthClientCredentials,&lt;BR /&gt; OAuthClientInfo = new OAuthClientInfo { ClientId = MYCLIENTID, ClientSecret =&amp;nbsp;MYCLIENTSECRET) },&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;AuthenticationManager.Current.RegisterServer(serverInfo);&lt;BR /&gt; &lt;BR /&gt; var cred = await AuthenticationManager.Current.GenerateCredentialAsync(tokenUri, new GenerateTokenOptions { });&lt;BR /&gt; &lt;BR /&gt; var exportTask = await ExportTileCacheTask.CreateAsync(serviceUri, cred);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var exportParams = await exportTask.CreateDefaultExportTileCacheParametersAsync(aoi, 50000, 10000);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;job = exportTask.ExportTileCache(exportParams, localFilePath);&lt;/P&gt;&lt;P&gt;job.JobChanged += ExportJob_JobChanged;&lt;BR /&gt; }&lt;BR /&gt; catch (Exception e)&lt;BR /&gt; {&lt;BR /&gt; e.ToString();&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Feb 2017 20:12:47 GMT</pubDate>
    <dc:creator>CalebPourchot</dc:creator>
    <dc:date>2017-02-15T20:12:47Z</dc:date>
    <item>
      <title>ExportTileCacheJob never starts</title>
      <link>https://community.esri.com/t5/developers-questions/exporttilecachejob-never-starts/m-p/514324#M3498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using the .Net runtime sdk (v.100) for Xamarin Android. I'm trying to download tiles as a .tpk for offline use by my mobile app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've managed to use the AuthenticationManager to give me a token for my app. I can successfully create the ExportTileCacheTask and create the ExportTileCacheJob by calling ExportTileCache on the ExportTileCacheTask, but the status of the job never seems to change.&amp;nbsp;When I check the job status immediately after the call to ExportTileCache, it is "NotStarted" and the ServerId = "". I have a breakpoint on my ExportJob_JobChanged handler and it never gets hit no matter how long I wait.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? Code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var serviceUri = new Uri("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Ftiledbasemaps.arcgis.com%2Farcgis%2Frest%2Fservices%2FWorld_Imagery%2FMapServer" rel="nofollow" target="_blank"&gt;https://tiledbasemaps.arcgis.com/arcgis/rest/services/World_Imagery/MapServer&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var tokenUri = new Uri("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com%2Fsharing%2Frest" rel="nofollow" target="_blank"&gt;https://www.arcgis.com/sharing/rest&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt; {&lt;BR /&gt; var serverInfo = new ServerInfo&lt;BR /&gt; {&lt;BR /&gt; ServerUri = tokenUri,&lt;BR /&gt; TokenAuthenticationType = TokenAuthenticationType.OAuthClientCredentials,&lt;BR /&gt; OAuthClientInfo = new OAuthClientInfo { ClientId = MYCLIENTID, ClientSecret =&amp;nbsp;MYCLIENTSECRET) },&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;AuthenticationManager.Current.RegisterServer(serverInfo);&lt;BR /&gt; &lt;BR /&gt; var cred = await AuthenticationManager.Current.GenerateCredentialAsync(tokenUri, new GenerateTokenOptions { });&lt;BR /&gt; &lt;BR /&gt; var exportTask = await ExportTileCacheTask.CreateAsync(serviceUri, cred);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var exportParams = await exportTask.CreateDefaultExportTileCacheParametersAsync(aoi, 50000, 10000);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;job = exportTask.ExportTileCache(exportParams, localFilePath);&lt;/P&gt;&lt;P&gt;job.JobChanged += ExportJob_JobChanged;&lt;BR /&gt; }&lt;BR /&gt; catch (Exception e)&lt;BR /&gt; {&lt;BR /&gt; e.ToString();&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2017 20:12:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/exporttilecachejob-never-starts/m-p/514324#M3498</guid>
      <dc:creator>CalebPourchot</dc:creator>
      <dc:date>2017-02-15T20:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: ExportTileCacheJob never starts</title>
      <link>https://community.esri.com/t5/developers-questions/exporttilecachejob-never-starts/m-p/514325#M3499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class="" style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 5px;"&gt;&lt;P style="border: 0px; margin: 0px 0px 1em;"&gt;Apparently the tooltip documentation on ExportTileCache is misleading. It does not, in fact, &lt;STRONG style="border: 0px; font-weight: bold;"&gt;Start&lt;/STRONG&gt; and return an ExportTileCacheJob. You must call Start() on the job to start it.&lt;/P&gt;&lt;P style="border: 0px; margin: 0px 0px 1em;"&gt;I finally found java documentation of the class that mentioned this.&lt;A href="https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/tasks/tilecache/ExportTileCacheJob.html" rel="nofollow noreferrer" style="color: #005999; border: 0px;"&gt;https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/tasks/tilecache/ExportTileCacheJob.html&lt;/A&gt;&lt;/P&gt;&lt;P style="border: 0px; margin: 0px 0px 1em;"&gt;After calling Start(), the JobChanged events fired as expected and I was able to successfully download a .tpk file.&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 21:58:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/exporttilecachejob-never-starts/m-p/514325#M3499</guid>
      <dc:creator>CalebPourchot</dc:creator>
      <dc:date>2017-02-27T21:58:09Z</dc:date>
    </item>
  </channel>
</rss>

