<?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: Error while Querying the feature layer in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/error-while-querying-the-feature-layer/m-p/126041#M913</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey People at Esri,This issue is so intimidating ... kindly please adress the issue&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 01 Sep 2019 07:42:53 GMT</pubDate>
    <dc:creator>AsifIsmail</dc:creator>
    <dc:date>2019-09-01T07:42:53Z</dc:date>
    <item>
      <title>Error while Querying the feature layer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/error-while-querying-the-feature-layer/m-p/126040#M912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i use arcgis android 100.5 to load and query the layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but often i get this error :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;java.util.concurrent.ExecutionException: com.esri.arcgisruntime.ArcGISRuntimeException: Cannot call this method in this context&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help,this is my code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #cc7832;"&gt;public static void &lt;/SPAN&gt;&lt;SPAN style="color: #ffc66d;"&gt;queryLayer&lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;(
&lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;        &lt;/SPAN&gt;ServiceFeatureTable serviceFeatureTable&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;MapActivity.LayerQueriedListener listener&lt;SPAN style="color: #9876aa;"&gt;) {
&lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;  &lt;/SPAN&gt;serviceFeatureTable.loadAsync&lt;SPAN style="color: #9876aa;"&gt;()&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;  &lt;/SPAN&gt;serviceFeatureTable.setCredential&lt;SPAN style="color: #9876aa;"&gt;(&lt;/SPAN&gt;Utilities.&lt;SPAN&gt;getUserCredentials&lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;())&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;  &lt;/SPAN&gt;serviceFeatureTable.addDoneLoadingListener&lt;SPAN style="color: #9876aa;"&gt;(
&lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;          () &lt;/SPAN&gt;-&amp;gt; &lt;SPAN style="color: #9876aa;"&gt;{
&lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;            &lt;/SPAN&gt;QueryParameters queryParameters = &lt;SPAN style="color: #cc7832;"&gt;new &lt;/SPAN&gt;QueryParameters&lt;SPAN style="color: #9876aa;"&gt;()&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;            &lt;/SPAN&gt;ListenableFuture&amp;lt;FeatureQueryResult&amp;gt; future =
                    &lt;SPAN style="color: #b389c5;"&gt;serviceFeatureTable&lt;/SPAN&gt;.queryFeaturesAsync&lt;SPAN style="color: #9876aa;"&gt;(
&lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;                            &lt;/SPAN&gt;queryParameters&lt;SPAN style="color: #9876aa;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;            &lt;/SPAN&gt;future.addDoneListener&lt;SPAN style="color: #9876aa;"&gt;(
&lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;                    () &lt;/SPAN&gt;-&amp;gt; &lt;SPAN style="color: #9876aa;"&gt;{
&lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;                      &lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;try &lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;{
&lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;                        &lt;/SPAN&gt;FeatureQueryResult result = &lt;SPAN style="color: #b389c5;"&gt;future&lt;/SPAN&gt;.get&lt;SPAN style="color: #9876aa;"&gt;()&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                        &lt;/SPAN&gt;Iterator&amp;lt;Feature&amp;gt; featureIterator = result.iterator&lt;SPAN style="color: #9876aa;"&gt;()&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;(&lt;/SPAN&gt;featureIterator.hasNext&lt;SPAN style="color: #9876aa;"&gt;()) {
&lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;                          &lt;/SPAN&gt;Feature feature = featureIterator.next&lt;SPAN style="color: #9876aa;"&gt;()&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                          &lt;/SPAN&gt;&lt;SPAN style="color: #b389c5;"&gt;listener&lt;/SPAN&gt;.onLayerQueryCompleted&lt;SPAN style="color: #9876aa;"&gt;(&lt;/SPAN&gt;feature.getGeometry&lt;SPAN style="color: #9876aa;"&gt;())&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                        &lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;}
&lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;                      } &lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;catch &lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;(&lt;/SPAN&gt;ExecutionException | InterruptedException e&lt;SPAN style="color: #9876aa;"&gt;) {
&lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;                        &lt;/SPAN&gt;System.&lt;SPAN style="color: #9876aa;"&gt;out&lt;/SPAN&gt;.println&lt;SPAN style="color: #9876aa;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;"Error querying service table :" &lt;/SPAN&gt;+ e.getCause&lt;SPAN style="color: #9876aa;"&gt;())&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;                      &lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;}
&lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;                    })&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;          &lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;})&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;;
&lt;/SPAN&gt;&lt;SPAN style="color: #9876aa;"&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;the issue is so annoying,pls address&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:10:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/error-while-querying-the-feature-layer/m-p/126040#M912</guid>
      <dc:creator>AsifIsmail</dc:creator>
      <dc:date>2021-12-11T07:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Error while Querying the feature layer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/error-while-querying-the-feature-layer/m-p/126041#M913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey People at Esri,This issue is so intimidating ... kindly please adress the issue&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Sep 2019 07:42:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/error-while-querying-the-feature-layer/m-p/126041#M913</guid>
      <dc:creator>AsifIsmail</dc:creator>
      <dc:date>2019-09-01T07:42:53Z</dc:date>
    </item>
  </channel>
</rss>

