<?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: Query in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/query/m-p/327660#M2161</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 0.714285em;"&gt;Please check out the sample:&lt;/P&gt;&lt;P style="margin-bottom: 0.714285em;"&gt;&lt;A href="https://developers.arcgis.com/android/sample-code/feature-service-table/" style="color: #047ac6;" title="https://developers.arcgis.com/android/sample-code/feature-service-table/"&gt;Query Feature Service Table | ArcGIS for Developers&lt;/A&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.714285em;"&gt;However, this sample is a query on GeodatabaseFeatureServiceTable. Since you mentioned that you published a points-layer as a runtime content, it should be GeodatabaseFeatureTable instead.&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;The difference between GeodatabaseFeatureServiceTable and GeodatabaseFeatureTable is:&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;In a connected workflow, the type of feature table you create and edit is a &lt;SPAN class="usertext"&gt;GeodatabaseFeatureServiceTable&lt;/SPAN&gt;. In a disconnected workflow, the type of feature table you create and edit is a &lt;SPAN class="usertext"&gt;GeodatabaseFeatureTable&lt;/SPAN&gt;. The class hierarchy between these is GeodatabaseFeatureServiceTable is inherited from GeodatabaseFeatureTable.&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;Now let's go over the code:&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;In onClick_okButton method:&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;SPAN class="hljs-comment"&gt;// Create query parameters, based on the constructed where clause.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;QueryParameters queryParams = &lt;SPAN class="hljs-keyword"&gt;new QueryParameters(); queryParams.setWhere(whereClause);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;SPAN class="hljs-comment"&gt;// Execute the query and create a callback for dealing with the results of the query. featureServiceTable.queryFeatures(queryParams, &lt;SPAN class="hljs-keyword"&gt;new CallbackListener&amp;lt;FeatureResult&amp;gt;() { &lt;SPAN class="hljs-annotation"&gt;@Override&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;public&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;void&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;onError&lt;/SPAN&gt;(Throwable ex)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;{ &lt;SPAN class="hljs-comment"&gt;// Highlight errors to the user.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;showToast(&lt;SPAN class="hljs-string"&gt;"Error querying FeatureServiceTable"); }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;SPAN class="hljs-annotation"&gt;@Override &lt;SPAN class="hljs-keyword"&gt;public &lt;SPAN class="hljs-keyword"&gt;void&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;onCallback&lt;/SPAN&gt;(FeatureResult objs)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;{ &lt;SPAN class="hljs-comment"&gt;// If there are no query results, inform user.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;SPAN class="hljs-keyword"&gt;if (objs.featureCount() &amp;lt; &lt;SPAN class="hljs-number"&gt;1) { showToast(&lt;SPAN class="hljs-string"&gt;"No results"&lt;/SPAN&gt;); &lt;SPAN class="hljs-keyword"&gt;return&lt;/SPAN&gt;; }&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;SPAN class="hljs-comment"&gt;// Report number of results to user.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;showToast(&lt;SPAN class="hljs-string"&gt;"Found " + objs.featureCount() + &lt;SPAN class="hljs-string"&gt;" features.");&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;SPAN class="hljs-comment"&gt;// Iterate the results and select each feature.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;SPAN class="hljs-keyword"&gt;for (Object objFeature : objs) { Feature feature = (Feature) objFeature; featureLayer.selectFeature(feature.getId()); } } }); }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;Note that featureServiceTable.queryFeatures, you can change it to GeodatabaseFeatureTable.queryFeatures, and set up the parameters in QueryParameters. &lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;See the API reference for the detailed information:&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;A href="https://developers.arcgis.com/android/api-reference/reference/com/esri/core/geodatabase/GeodatabaseFeatureTable.html" title="https://developers.arcgis.com/android/api-reference/reference/com/esri/core/geodatabase/GeodatabaseFeatureTable.html"&gt;GeodatabaseFeatureTable | ArcGIS Android 10.2.4 API&lt;/A&gt; &lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;Let me know if you have any questions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Dec 2014 19:19:58 GMT</pubDate>
    <dc:creator>MengyiGuo</dc:creator>
    <dc:date>2014-12-08T19:19:58Z</dc:date>
    <item>
      <title>Query</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/query/m-p/327659#M2160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I published a points-layer as a runtime content (Cities layer, its table include a field for cities’ names: “[Name]”), how can I query features (Cities points) using their names which the user types in a text box (EditText)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 13:32:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/query/m-p/327659#M2160</guid>
      <dc:creator>HaniDraidi</dc:creator>
      <dc:date>2014-12-01T13:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/query/m-p/327660#M2161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 0.714285em;"&gt;Please check out the sample:&lt;/P&gt;&lt;P style="margin-bottom: 0.714285em;"&gt;&lt;A href="https://developers.arcgis.com/android/sample-code/feature-service-table/" style="color: #047ac6;" title="https://developers.arcgis.com/android/sample-code/feature-service-table/"&gt;Query Feature Service Table | ArcGIS for Developers&lt;/A&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.714285em;"&gt;However, this sample is a query on GeodatabaseFeatureServiceTable. Since you mentioned that you published a points-layer as a runtime content, it should be GeodatabaseFeatureTable instead.&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;The difference between GeodatabaseFeatureServiceTable and GeodatabaseFeatureTable is:&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;In a connected workflow, the type of feature table you create and edit is a &lt;SPAN class="usertext"&gt;GeodatabaseFeatureServiceTable&lt;/SPAN&gt;. In a disconnected workflow, the type of feature table you create and edit is a &lt;SPAN class="usertext"&gt;GeodatabaseFeatureTable&lt;/SPAN&gt;. The class hierarchy between these is GeodatabaseFeatureServiceTable is inherited from GeodatabaseFeatureTable.&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;Now let's go over the code:&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;In onClick_okButton method:&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;SPAN class="hljs-comment"&gt;// Create query parameters, based on the constructed where clause.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;QueryParameters queryParams = &lt;SPAN class="hljs-keyword"&gt;new QueryParameters(); queryParams.setWhere(whereClause);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;SPAN class="hljs-comment"&gt;// Execute the query and create a callback for dealing with the results of the query. featureServiceTable.queryFeatures(queryParams, &lt;SPAN class="hljs-keyword"&gt;new CallbackListener&amp;lt;FeatureResult&amp;gt;() { &lt;SPAN class="hljs-annotation"&gt;@Override&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;public&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;void&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;onError&lt;/SPAN&gt;(Throwable ex)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;{ &lt;SPAN class="hljs-comment"&gt;// Highlight errors to the user.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;showToast(&lt;SPAN class="hljs-string"&gt;"Error querying FeatureServiceTable"); }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;SPAN class="hljs-annotation"&gt;@Override &lt;SPAN class="hljs-keyword"&gt;public &lt;SPAN class="hljs-keyword"&gt;void&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;onCallback&lt;/SPAN&gt;(FeatureResult objs)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;{ &lt;SPAN class="hljs-comment"&gt;// If there are no query results, inform user.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;SPAN class="hljs-keyword"&gt;if (objs.featureCount() &amp;lt; &lt;SPAN class="hljs-number"&gt;1) { showToast(&lt;SPAN class="hljs-string"&gt;"No results"&lt;/SPAN&gt;); &lt;SPAN class="hljs-keyword"&gt;return&lt;/SPAN&gt;; }&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;SPAN class="hljs-comment"&gt;// Report number of results to user.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;showToast(&lt;SPAN class="hljs-string"&gt;"Found " + objs.featureCount() + &lt;SPAN class="hljs-string"&gt;" features.");&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;SPAN class="hljs-comment"&gt;// Iterate the results and select each feature.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;SPAN class="hljs-keyword"&gt;for (Object objFeature : objs) { Feature feature = (Feature) objFeature; featureLayer.selectFeature(feature.getId()); } } }); }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;Note that featureServiceTable.queryFeatures, you can change it to GeodatabaseFeatureTable.queryFeatures, and set up the parameters in QueryParameters. &lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;See the API reference for the detailed information:&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;A href="https://developers.arcgis.com/android/api-reference/reference/com/esri/core/geodatabase/GeodatabaseFeatureTable.html" title="https://developers.arcgis.com/android/api-reference/reference/com/esri/core/geodatabase/GeodatabaseFeatureTable.html"&gt;GeodatabaseFeatureTable | ArcGIS Android 10.2.4 API&lt;/A&gt; &lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;&lt;/P&gt;&lt;P style="font-family: gotham, Helvetica, Arial, 'Droid Sans', sans-serif; color: #373737;"&gt;Let me know if you have any questions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 19:19:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/query/m-p/327660#M2161</guid>
      <dc:creator>MengyiGuo</dc:creator>
      <dc:date>2014-12-08T19:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/query/m-p/327661#M2162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Mengyi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your massive contribution, I tried this code, and it worked well!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again and Best Regards,&lt;/P&gt;&lt;P&gt;Hani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 07:29:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/query/m-p/327661#M2162</guid>
      <dc:creator>HaniDraidi</dc:creator>
      <dc:date>2014-12-10T07:29:41Z</dc:date>
    </item>
  </channel>
</rss>

