<?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: Getting Point of Current Locaiton in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/getting-point-of-current-locaiton/m-p/166748#M1142</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohamed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because your statement&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Log.&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12px;"&gt;i&lt;/SPAN&gt;(&lt;SPAN style="color: #9876aa; border: 0px; font-weight: inherit; font-size: 12px;"&gt;TAG&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832; border: 0px; font-weight: inherit; font-size: 12px;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759; border: 0px; font-weight: inherit; font-size: 12px;"&gt;"HERE is the Location " &lt;/SPAN&gt;+ Double.&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12px;"&gt;toString&lt;/SPAN&gt;(locationChangedEvent.getLocation().getPosition().getY()) + &lt;SPAN style="color: #6a8759; border: 0px; font-weight: inherit; font-size: 12px;"&gt;"&amp;nbsp; "
&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759; border: 0px; font-weight: inherit; font-size: 12px;"&gt; &lt;/SPAN&gt;+ Double.&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12px;"&gt;toString&lt;/SPAN&gt;(locationChangedEvent.getLocation().getPosition().getX())
 )&lt;SPAN style="color: #cc7832; border: 0px; font-weight: inherit; font-size: 12px;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;prints out the correct latitude and longitude, is there perhaps an problem with casting the double value to your Latitude and Longitude?&amp;nbsp; Can you provide the model object definition for your Longitude and Latitude objects?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandie Peters&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 08:41:50 GMT</pubDate>
    <dc:creator>SandiePeters</dc:creator>
    <dc:date>2021-12-11T08:41:50Z</dc:date>
    <item>
      <title>Getting Point of Current Locaiton</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/getting-point-of-current-locaiton/m-p/166747#M1141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys, I'm having little trouble with getting current location point.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Portion of my code:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #9876aa;"&gt;locationDisplay&lt;/SPAN&gt;.setAutoPanMode(LocationDisplay.AutoPanMode.&lt;SPAN style="color: #9876aa;"&gt;RECENTER&lt;/SPAN&gt;)&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;locationDisplay&lt;/SPAN&gt;.addLocationChangedListener(&lt;SPAN style="color: #cc7832;"&gt;new &lt;/SPAN&gt;LocationDisplay.LocationChangedListener() {
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #bbb529;"&gt;@Override
&lt;/SPAN&gt;&lt;SPAN style="color: #bbb529;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;public void &lt;/SPAN&gt;&lt;SPAN style="color: #ffc66d;"&gt;onLocationChanged&lt;/SPAN&gt;(LocationDisplay.LocationChangedEvent locationChangedEvent) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080;"&gt;//&amp;nbsp; Log.i(TAG, "HERE is the Location " + Double.toString(locationChangedEvent.getLocation().getPosition().getY()) + "&amp;nbsp; "
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; + Double.toString(locationChangedEvent.getLocation().getPosition().getX())
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // );
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;Latitude &lt;/SPAN&gt;=&amp;nbsp; Double.&lt;SPAN&gt;toString&lt;/SPAN&gt;(locationChangedEvent.getLocation().getPosition().getY())&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;Longitude &lt;/SPAN&gt;= Double.&lt;SPAN&gt;toString&lt;/SPAN&gt;(locationChangedEvent.getLocation().getPosition().getX())&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Log.&lt;SPAN&gt;i&lt;/SPAN&gt;(&lt;SPAN style="color: #9876aa;"&gt;TAG&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;Latitude &lt;/SPAN&gt;+ &lt;SPAN style="color: #6a8759;"&gt;" *** " &lt;/SPAN&gt;+ &lt;SPAN style="color: #9876aa;"&gt;Longitude&lt;/SPAN&gt;)&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}
})&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;if&lt;/SPAN&gt;(!&lt;SPAN style="color: #9876aa;"&gt;locationDisplay&lt;/SPAN&gt;.isStarted())
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #9876aa;"&gt;locationDisplay&lt;/SPAN&gt;.startAsync()&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;//this line prints null
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Log.&lt;SPAN&gt;i&lt;/SPAN&gt;(&lt;SPAN style="color: #9876aa;"&gt;TAG&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"LOCATION IS STARTED!" &lt;/SPAN&gt;+ &lt;SPAN style="color: #9876aa;"&gt;Latitude &lt;/SPAN&gt;+ &lt;SPAN style="color: #6a8759;"&gt;"&amp;nbsp; " &lt;/SPAN&gt;+ &lt;SPAN style="color: #9876aa;"&gt;Longitude&lt;/SPAN&gt;)&lt;SPAN style="color: #cc7832;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;P&gt;The problem I having is that, I'm trying get the current location points. When I run the app, only this statement prints the data&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Log.&lt;SPAN&gt;i&lt;/SPAN&gt;(&lt;SPAN style="color: #9876aa;"&gt;TAG&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"HERE is the Location " &lt;/SPAN&gt;+ Double.&lt;SPAN&gt;toString&lt;/SPAN&gt;(locationChangedEvent.getLocation().getPosition().getY()) + &lt;SPAN style="color: #6a8759;"&gt;"&amp;nbsp; "
&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt; &lt;/SPAN&gt;+ Double.&lt;SPAN&gt;toString&lt;/SPAN&gt;(locationChangedEvent.getLocation().getPosition().getX())
 )&lt;SPAN style="color: #cc7832;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;but,&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Log.&lt;SPAN&gt;i&lt;/SPAN&gt;(&lt;SPAN style="color: #9876aa;"&gt;TAG&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"LOCATION IS STARTED!" &lt;/SPAN&gt;+ &lt;SPAN style="color: #9876aa;"&gt;Latitude &lt;/SPAN&gt;+ &lt;SPAN style="color: #6a8759;"&gt;"&amp;nbsp; " &lt;/SPAN&gt;+ &lt;SPAN style="color: #9876aa;"&gt;Longitude&lt;/SPAN&gt;)&lt;SPAN style="color: #cc7832;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;this prints null on both variable. Since I have assigned the Longitude and Latitude variable on the OnLocationChanged method, why does this prints null. Is there any way I can fix this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;02-15 23:35:10.357 23095-23095/com.example.moham.esrimap I/progress: LOCATION IS STARTED!null null&lt;BR /&gt;02-15 23:35:12.314 23095-23095/? I/progress: 38.9808961 *** -125.3387306&lt;BR /&gt;02-15 23:35:12.315 23095-23095/? I/progress: 38.9808961 *** -125.3387306&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:41:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/getting-point-of-current-locaiton/m-p/166747#M1141</guid>
      <dc:creator>mohamedyousuf</dc:creator>
      <dc:date>2021-12-11T08:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Point of Current Locaiton</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/getting-point-of-current-locaiton/m-p/166748#M1142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohamed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because your statement&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Log.&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12px;"&gt;i&lt;/SPAN&gt;(&lt;SPAN style="color: #9876aa; border: 0px; font-weight: inherit; font-size: 12px;"&gt;TAG&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832; border: 0px; font-weight: inherit; font-size: 12px;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759; border: 0px; font-weight: inherit; font-size: 12px;"&gt;"HERE is the Location " &lt;/SPAN&gt;+ Double.&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12px;"&gt;toString&lt;/SPAN&gt;(locationChangedEvent.getLocation().getPosition().getY()) + &lt;SPAN style="color: #6a8759; border: 0px; font-weight: inherit; font-size: 12px;"&gt;"&amp;nbsp; "
&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759; border: 0px; font-weight: inherit; font-size: 12px;"&gt; &lt;/SPAN&gt;+ Double.&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12px;"&gt;toString&lt;/SPAN&gt;(locationChangedEvent.getLocation().getPosition().getX())
 )&lt;SPAN style="color: #cc7832; border: 0px; font-weight: inherit; font-size: 12px;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;prints out the correct latitude and longitude, is there perhaps an problem with casting the double value to your Latitude and Longitude?&amp;nbsp; Can you provide the model object definition for your Longitude and Latitude objects?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandie Peters&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:41:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/getting-point-of-current-locaiton/m-p/166748#M1142</guid>
      <dc:creator>SandiePeters</dc:creator>
      <dc:date>2021-12-11T08:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Point of Current Locaiton</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/getting-point-of-current-locaiton/m-p/166749#M1143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohamed,&lt;/P&gt;&lt;P&gt;More thoughts on this...the&amp;nbsp; locationDisplay.startAsync() is an async process which hasn't completed by the time you print the log statement:&lt;/P&gt;&lt;PRE style="color: #a9b7c6; border: 0px; font-size: 9pt;"&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit; font-size: 12px;"&gt; &lt;/SPAN&gt;Log.&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12px;"&gt;i&lt;/SPAN&gt;(&lt;SPAN style="color: #9876aa; border: 0px; font-weight: inherit; font-size: 12px;"&gt;TAG&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832; border: 0px; font-weight: inherit; font-size: 12px;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759; border: 0px; font-weight: inherit; font-size: 12px;"&gt;"LOCATION IS STARTED!" &lt;/SPAN&gt;+ &lt;SPAN style="color: #9876aa; border: 0px; font-weight: inherit; font-size: 12px;"&gt;Latitude &lt;/SPAN&gt;+ &lt;SPAN style="color: #6a8759; border: 0px; font-weight: inherit; font-size: 12px;"&gt;"&amp;nbsp; " &lt;/SPAN&gt;+ &lt;SPAN style="color: #9876aa; border: 0px; font-weight: inherit; font-size: 12px;"&gt;Longitude&lt;/SPAN&gt;)&lt;SPAN style="color: #cc7832; border: 0px; font-weight: inherit; font-size: 12px;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;The Latitude and Longitude variables haven't yet been assigned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully this helps,&lt;/P&gt;&lt;P&gt;Sandie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 16:41:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/getting-point-of-current-locaiton/m-p/166749#M1143</guid>
      <dc:creator>SandiePeters</dc:creator>
      <dc:date>2018-02-16T16:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Point of Current Locaiton</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/getting-point-of-current-locaiton/m-p/166750#M1144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peters, thanks for your suggestion. I haven't got any errors in casting. But ill look forward into it. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 17:53:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/getting-point-of-current-locaiton/m-p/166750#M1144</guid>
      <dc:creator>mohamedyousuf</dc:creator>
      <dc:date>2018-02-16T17:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Point of Current Locaiton</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/getting-point-of-current-locaiton/m-p/166751#M1145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi peters, i'll check out this.. Do you think i will work if I did like this&lt;/P&gt;&lt;PRE style="color: #a9b7c6; border: 0px; font-size: 9pt;"&gt;&lt;SPAN style="color: #cc7832; border: 0px; font-weight: inherit; font-size: 12px;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #9876aa; border: 0px; font-weight: inherit; font-size: 12px;"&gt;locationDisplay&lt;/SPAN&gt;.isStarted()) Log.&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12px;"&gt;i&lt;/SPAN&gt;(&lt;SPAN style="color: #9876aa; border: 0px; font-weight: inherit; font-size: 12px;"&gt;TAG&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832; border: 0px; font-weight: inherit; font-size: 12px;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759; border: 0px; font-weight: inherit; font-size: 12px;"&gt;"LOCATION IS STARTED!" &lt;/SPAN&gt;+ &lt;SPAN style="color: #9876aa; border: 0px; font-weight: inherit; font-size: 12px;"&gt;Latitude &lt;/SPAN&gt;+ &lt;SPAN style="color: #6a8759; border: 0px; font-weight: inherit; font-size: 12px;"&gt;"&amp;nbsp; " &lt;/SPAN&gt;+ &lt;SPAN style="color: #9876aa; border: 0px; font-weight: inherit; font-size: 12px;"&gt;Longitude&lt;/SPAN&gt;)&lt;SPAN style="color: #cc7832; border: 0px; font-weight: inherit; font-size: 12px;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 17:54:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/getting-point-of-current-locaiton/m-p/166751#M1145</guid>
      <dc:creator>mohamedyousuf</dc:creator>
      <dc:date>2018-02-16T17:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Point of Current Locaiton</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/getting-point-of-current-locaiton/m-p/166752#M1146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yosuf,&lt;/P&gt;&lt;P&gt;I think the best way to ensure that you have a non-null location is to acquire it in the addLocationListener() function.&amp;nbsp; For example, below I have a function called assigLocation(Point point) which I call from within the listener.&amp;nbsp; &amp;nbsp;You could then assign your Latitude and Longitude variables there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Sandie&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #808000;"&gt;@Override
&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;protected void &lt;/SPAN&gt;onResume() {
&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;super&lt;/SPAN&gt;.onResume();
&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView &lt;/SPAN&gt;!= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;null&lt;/SPAN&gt;){
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.resume();
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;String longitude = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;null&lt;/SPAN&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mLocationDisplay &lt;/SPAN&gt;= &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.getLocationDisplay();
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mLocationDisplay&lt;/SPAN&gt;.addLocationChangedListener(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;LocationDisplay.LocationChangedListener() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808000;"&gt;@Override &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;onLocationChanged(LocationDisplay.LocationChangedEvent locationChangedEvent) {
&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LocationDataSource.Location location = &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mLocationDisplay&lt;/SPAN&gt;.getLocation();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;(location != &lt;SPAN style="color: #000080; font-weight: bold;"&gt;null&lt;/SPAN&gt;) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Point point = location.getPosition();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; assignLocation (point);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;if&lt;/SPAN&gt;(!&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mLocationDisplay&lt;/SPAN&gt;.isStarted())
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mLocationDisplay&lt;/SPAN&gt;.startAsync();
&amp;nbsp; }
}
&lt;SPAN style="color: #000080; font-weight: bold;"&gt;private void &lt;/SPAN&gt;assignLocation(Point point) {
&amp;nbsp; Point myLocation = point;
&amp;nbsp; Log.&lt;SPAN&gt;i&lt;/SPAN&gt;(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"MainActivity"&lt;/SPAN&gt;, &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"My device location is " &lt;/SPAN&gt;+ point.getX() + &lt;SPAN style="color: #008000; font-weight: bold;"&gt;" " &lt;/SPAN&gt;+ point.getY());
&amp;nbsp; &lt;SPAN style="color: #808080;"&gt;// You could also assign your Longitude and Latitude values here
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp; &lt;/SPAN&gt;Longitude = point.getX();
&amp;nbsp; Latitude = point.getY();
}

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:41:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/getting-point-of-current-locaiton/m-p/166752#M1146</guid>
      <dc:creator>SandiePeters</dc:creator>
      <dc:date>2021-12-11T08:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Point of Current Locaiton</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/getting-point-of-current-locaiton/m-p/166753#M1147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you soo much Sandie for your time to help me. I really appreciate it. I'm new to arcGis, thats y I had question. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Feb 2018 02:53:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/getting-point-of-current-locaiton/m-p/166753#M1147</guid>
      <dc:creator>mohamedyousuf</dc:creator>
      <dc:date>2018-02-17T02:53:33Z</dc:date>
    </item>
  </channel>
</rss>

