<?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: Can I Provide Coordinates to the Location Service? in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/can-i-provide-coordinates-to-the-location-service/m-p/564862#M3849</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;James, yes if you have an app that already is using a Location Listener you can use what are called "Mock" locations. There are a few steps to follow:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Add this line to your manifest permissions: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Make sure in your phone settings that you have checked "Allow mock locations"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) Create and inject the mock locations: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Location mockLocation = new Location(mocLocationProvider); 
mockLocation.setLatitude(-34.000);&amp;nbsp;&amp;nbsp; 
mockLocation.setLongitude(72.000); 
mockLocation.setAltitude(2000); 
mockLocation.setTime(1359043067); 
locationManager.setTestProviderLocation( mocLocationProvider, mockLocation); 
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4) To simulate movement set up a handler.postDelayed(this,&amp;lt;delay in ms&amp;gt;) and loop through an array containing your mock locations.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 00:20:54 GMT</pubDate>
    <dc:creator>AndyGup</dc:creator>
    <dc:date>2021-12-12T00:20:54Z</dc:date>
    <item>
      <title>Can I Provide Coordinates to the Location Service?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/can-i-provide-coordinates-to-the-location-service/m-p/564861#M3848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would like to spoof the location in my ap in order to demonstrate some functionality.&amp;nbsp; I would like to be able to provide coordinates to the location service in regular intervals in order to simulate moving along a path. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this possible?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 15:32:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/can-i-provide-coordinates-to-the-location-service/m-p/564861#M3848</guid>
      <dc:creator>JamesGist</dc:creator>
      <dc:date>2013-01-22T15:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can I Provide Coordinates to the Location Service?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/can-i-provide-coordinates-to-the-location-service/m-p/564862#M3849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;James, yes if you have an app that already is using a Location Listener you can use what are called "Mock" locations. There are a few steps to follow:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Add this line to your manifest permissions: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Make sure in your phone settings that you have checked "Allow mock locations"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) Create and inject the mock locations: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Location mockLocation = new Location(mocLocationProvider); 
mockLocation.setLatitude(-34.000);&amp;nbsp;&amp;nbsp; 
mockLocation.setLongitude(72.000); 
mockLocation.setAltitude(2000); 
mockLocation.setTime(1359043067); 
locationManager.setTestProviderLocation( mocLocationProvider, mockLocation); 
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4) To simulate movement set up a handler.postDelayed(this,&amp;lt;delay in ms&amp;gt;) and loop through an array containing your mock locations.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:20:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/can-i-provide-coordinates-to-the-location-service/m-p/564862#M3849</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2021-12-12T00:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can I Provide Coordinates to the Location Service?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/can-i-provide-coordinates-to-the-location-service/m-p/564863#M3850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the info Andy.&amp;nbsp; I'll give this a try in the next day or so and report back.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 20:28:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/can-i-provide-coordinates-to-the-location-service/m-p/564863#M3850</guid>
      <dc:creator>JamesGist</dc:creator>
      <dc:date>2013-01-24T20:28:02Z</dc:date>
    </item>
  </channel>
</rss>

