<?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 Convert Queried Feature to ArcGIS Feature - ArcGIS Android SDK in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/convert-queried-feature-to-arcgis-feature-arcgis/m-p/407852#M2780</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;Given below are my scenario&lt;/P&gt;&lt;P&gt;Query the service Url with object id then if it contains any attachment then display it and facilitate the user to add attachments.&lt;/P&gt;&lt;P&gt;I have&amp;nbsp;referred the samples and found the Edit attachment. But in that it has been done through ListenableFuture&amp;lt;IdentifyLayerResult&amp;gt;. But instead I want to do it with&amp;nbsp;ListenableFuture&amp;lt;FeatureQueryResult&amp;gt;&lt;/P&gt;&lt;P&gt;Everything fine till the query and getting result. After getting result and iterating through next. I am getting result as feature and could not find any method to convert&amp;nbsp; from&amp;nbsp;com.esri.arcgisruntime.data.Feature&amp;nbsp;to&amp;nbsp;com.esri.arcgisruntime.data.ArcGISFeature. Please suggest me on this.&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;STRONG style="color: #000080; "&gt;Given below Code Snap&lt;/STRONG&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;

private void &lt;/SPAN&gt;QueryFeatureandLoad()
{
     
    &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mServiceFeatureTable &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ServiceFeatureTable(getString(R.string.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;sample_service_url&lt;/SPAN&gt;));
    &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mServiceFeatureTable&lt;/SPAN&gt;.setFeatureRequestMode(ServiceFeatureTable.FeatureRequestMode.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;ON_INTERACTION_CACHE&lt;/SPAN&gt;);
    &lt;SPAN style="color: #808080;"&gt;// create the feature layer using the service feature table
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;    &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureLayer &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;FeatureLayer(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mServiceFeatureTable&lt;/SPAN&gt;);
  &lt;SPAN style="color: #808080;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;    // clear any previous selection
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;    &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureLayer&lt;/SPAN&gt;.clearSelection();
    &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mSelectedArcGISFeature &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;null&lt;/SPAN&gt;;
    &lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;QueryParameters query = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;QueryParameters();
    &lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;String searchString =&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"objectid=77"&lt;/SPAN&gt;;

    &lt;SPAN style="color: #808080;"&gt;//make search case insensitive
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;    &lt;/SPAN&gt;query.setWhereClause(searchString);
    &lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;ListenableFuture&amp;lt;FeatureQueryResult&amp;gt; future = &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mServiceFeatureTable&lt;/SPAN&gt;.queryFeaturesAsync(query, ServiceFeatureTable.QueryFeatureFields.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;LOAD_ALL&lt;/SPAN&gt;);

    &lt;SPAN style="color: #808080;"&gt;// add done loading listener to fire when the selection returns
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;    &lt;/SPAN&gt;future.addDoneListener(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Runnable() {
        &lt;SPAN style="color: #808000;"&gt;@Override
&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;        &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;run() {
            &lt;SPAN style="color: #000080; font-weight: bold;"&gt;try &lt;/SPAN&gt;{
                &lt;SPAN style="color: #808080;"&gt;// call get on the future to get the result
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;                &lt;/SPAN&gt;FeatureQueryResult result = &lt;SPAN style="color: #660e7a;"&gt;future&lt;/SPAN&gt;.get();

                &lt;SPAN style="color: #808080;"&gt;// check there are some results
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;                &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;(result.iterator().hasNext()) {

                    &lt;SPAN style="color: #808080;"&gt;// get the extend of the first feature in the result to zoom to
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;                    &lt;/SPAN&gt;Feature feature = result.iterator().next();
                    Envelope envelope = feature.getGeometry().getExtent();
                    &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.setViewpointGeometryAsync(envelope, &lt;SPAN style="color: #0000ff;"&gt;10&lt;/SPAN&gt;);
                       &lt;SPAN style="color: #808080;"&gt;//Select the feature
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;                    &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureLayer&lt;/SPAN&gt;.selectFeature(feature);
                  
                    
                         
&lt;SPAN style="color: #808080;"&gt;&lt;SPAN style="text-decoration: underline; font-family: 'arial black', sans-serif; font-size: 15px;"&gt;&lt;STRONG&gt;             //*** &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/plain.png" /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline; font-family: 'arial black', sans-serif;"&gt;&lt;STRONG&gt;GOT STUCKUP HERE * mselectedArcGISFeature is ArcGISFeature ----&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline; font-family: 'arial black', sans-serif; font-size: 15px;"&gt; How to Convert Feature to ArcGISFeature &lt;/SPAN&gt;


&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;                    &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mAttributeID &lt;/SPAN&gt;= &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mSelectedArcGISFeature&lt;/SPAN&gt;.getAttributes().get(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"objectid"&lt;/SPAN&gt;).toString();
                    &lt;SPAN style="color: #808080;"&gt;// get the number of attachments
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;                    &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;ListenableFuture&amp;lt;List&amp;lt;Attachment&amp;gt;&amp;gt; attachmentResults = &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mSelectedArcGISFeature&lt;/SPAN&gt;.fetchAttachmentsAsync();
                    attachmentResults.addDoneListener(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Runnable() {
                        &lt;SPAN style="color: #808000;"&gt;@Override
&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;                        &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;run() {
                            &lt;SPAN style="color: #000080; font-weight: bold;"&gt;try &lt;/SPAN&gt;{
                                &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;attachments &lt;/SPAN&gt;= &lt;SPAN style="color: #660e7a;"&gt;attachmentResults&lt;/SPAN&gt;.get();
                                Log.&lt;SPAN&gt;d&lt;/SPAN&gt;(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"number of attachments :"&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;attachments&lt;/SPAN&gt;.size() + &lt;SPAN style="color: #008000; font-weight: bold;"&gt;""&lt;/SPAN&gt;);
                                &lt;SPAN style="color: #808080;"&gt;// show callout with the value for the attribute "typdamage" of the selected feature
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;                                &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mSelectedArcGISFeatureAttributeValue &lt;/SPAN&gt;= (String) &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mSelectedArcGISFeature&lt;/SPAN&gt;.getAttributes().get(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"typdamage"&lt;/SPAN&gt;);
                                &lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;progressDialog&lt;/SPAN&gt;.isShowing()) {
                                    &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;progressDialog&lt;/SPAN&gt;.dismiss();
                                }
                                showCallout(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mSelectedArcGISFeatureAttributeValue&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;attachments&lt;/SPAN&gt;.size(),&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mapPoint&lt;/SPAN&gt;);
                                Toast.&lt;SPAN&gt;makeText&lt;/SPAN&gt;(MainActivity.&lt;SPAN style="color: #000080; font-weight: bold;"&gt;this&lt;/SPAN&gt;, getApplication().getString(R.string.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;info_button_message&lt;/SPAN&gt;), Toast.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;LENGTH_SHORT&lt;/SPAN&gt;).show();
                            } &lt;SPAN style="color: #000080; font-weight: bold;"&gt;catch &lt;/SPAN&gt;(Exception e) {
                                Log.&lt;SPAN&gt;e&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;TAG&lt;/SPAN&gt;, e.getMessage());
                            }
                        }
                    });

                } &lt;SPAN style="color: #000080; font-weight: bold;"&gt;else &lt;/SPAN&gt;{
                    Toast.&lt;SPAN&gt;makeText&lt;/SPAN&gt;(MainActivity.&lt;SPAN style="color: #000080; font-weight: bold;"&gt;this&lt;/SPAN&gt;, &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"No states found with name: " &lt;/SPAN&gt;+ &lt;SPAN style="color: #660e7a;"&gt;searchString&lt;/SPAN&gt;, Toast.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;LENGTH_SHORT&lt;/SPAN&gt;).show();
                }
            } &lt;SPAN style="color: #000080; font-weight: bold;"&gt;catch &lt;/SPAN&gt;(Exception e) {
                Toast.&lt;SPAN&gt;makeText&lt;/SPAN&gt;(MainActivity.&lt;SPAN style="color: #000080; font-weight: bold;"&gt;this&lt;/SPAN&gt;, &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Feature search failed for: " &lt;/SPAN&gt;+ &lt;SPAN style="color: #660e7a;"&gt;searchString &lt;/SPAN&gt;+ &lt;SPAN style="color: #008000; font-weight: bold;"&gt;". Error=" &lt;/SPAN&gt;+ e.getMessage(),
                        Toast.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;LENGTH_SHORT&lt;/SPAN&gt;).show();
                Log.&lt;SPAN&gt;e&lt;/SPAN&gt;(getResources().getString(R.string.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;app_name&lt;/SPAN&gt;),
                        &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Feature search failed for: " &lt;/SPAN&gt;+ &lt;SPAN style="color: #660e7a;"&gt;searchString &lt;/SPAN&gt;+ &lt;SPAN style="color: #008000; font-weight: bold;"&gt;". Error=" &lt;/SPAN&gt;+ e.getMessage());
            }
        }
    });



}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 18:32:54 GMT</pubDate>
    <dc:creator>ShanMGIS</dc:creator>
    <dc:date>2021-12-11T18:32:54Z</dc:date>
    <item>
      <title>Convert Queried Feature to ArcGIS Feature - ArcGIS Android SDK</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/convert-queried-feature-to-arcgis-feature-arcgis/m-p/407852#M2780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;Given below are my scenario&lt;/P&gt;&lt;P&gt;Query the service Url with object id then if it contains any attachment then display it and facilitate the user to add attachments.&lt;/P&gt;&lt;P&gt;I have&amp;nbsp;referred the samples and found the Edit attachment. But in that it has been done through ListenableFuture&amp;lt;IdentifyLayerResult&amp;gt;. But instead I want to do it with&amp;nbsp;ListenableFuture&amp;lt;FeatureQueryResult&amp;gt;&lt;/P&gt;&lt;P&gt;Everything fine till the query and getting result. After getting result and iterating through next. I am getting result as feature and could not find any method to convert&amp;nbsp; from&amp;nbsp;com.esri.arcgisruntime.data.Feature&amp;nbsp;to&amp;nbsp;com.esri.arcgisruntime.data.ArcGISFeature. Please suggest me on this.&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;STRONG style="color: #000080; "&gt;Given below Code Snap&lt;/STRONG&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;

private void &lt;/SPAN&gt;QueryFeatureandLoad()
{
     
    &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mServiceFeatureTable &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ServiceFeatureTable(getString(R.string.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;sample_service_url&lt;/SPAN&gt;));
    &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mServiceFeatureTable&lt;/SPAN&gt;.setFeatureRequestMode(ServiceFeatureTable.FeatureRequestMode.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;ON_INTERACTION_CACHE&lt;/SPAN&gt;);
    &lt;SPAN style="color: #808080;"&gt;// create the feature layer using the service feature table
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;    &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureLayer &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;FeatureLayer(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mServiceFeatureTable&lt;/SPAN&gt;);
  &lt;SPAN style="color: #808080;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;    // clear any previous selection
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;    &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureLayer&lt;/SPAN&gt;.clearSelection();
    &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mSelectedArcGISFeature &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;null&lt;/SPAN&gt;;
    &lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;QueryParameters query = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;QueryParameters();
    &lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;String searchString =&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"objectid=77"&lt;/SPAN&gt;;

    &lt;SPAN style="color: #808080;"&gt;//make search case insensitive
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;    &lt;/SPAN&gt;query.setWhereClause(searchString);
    &lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;ListenableFuture&amp;lt;FeatureQueryResult&amp;gt; future = &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mServiceFeatureTable&lt;/SPAN&gt;.queryFeaturesAsync(query, ServiceFeatureTable.QueryFeatureFields.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;LOAD_ALL&lt;/SPAN&gt;);

    &lt;SPAN style="color: #808080;"&gt;// add done loading listener to fire when the selection returns
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;    &lt;/SPAN&gt;future.addDoneListener(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Runnable() {
        &lt;SPAN style="color: #808000;"&gt;@Override
&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;        &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;run() {
            &lt;SPAN style="color: #000080; font-weight: bold;"&gt;try &lt;/SPAN&gt;{
                &lt;SPAN style="color: #808080;"&gt;// call get on the future to get the result
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;                &lt;/SPAN&gt;FeatureQueryResult result = &lt;SPAN style="color: #660e7a;"&gt;future&lt;/SPAN&gt;.get();

                &lt;SPAN style="color: #808080;"&gt;// check there are some results
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;                &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;(result.iterator().hasNext()) {

                    &lt;SPAN style="color: #808080;"&gt;// get the extend of the first feature in the result to zoom to
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;                    &lt;/SPAN&gt;Feature feature = result.iterator().next();
                    Envelope envelope = feature.getGeometry().getExtent();
                    &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMapView&lt;/SPAN&gt;.setViewpointGeometryAsync(envelope, &lt;SPAN style="color: #0000ff;"&gt;10&lt;/SPAN&gt;);
                       &lt;SPAN style="color: #808080;"&gt;//Select the feature
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;                    &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFeatureLayer&lt;/SPAN&gt;.selectFeature(feature);
                  
                    
                         
&lt;SPAN style="color: #808080;"&gt;&lt;SPAN style="text-decoration: underline; font-family: 'arial black', sans-serif; font-size: 15px;"&gt;&lt;STRONG&gt;             //*** &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/plain.png" /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline; font-family: 'arial black', sans-serif;"&gt;&lt;STRONG&gt;GOT STUCKUP HERE * mselectedArcGISFeature is ArcGISFeature ----&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline; font-family: 'arial black', sans-serif; font-size: 15px;"&gt; How to Convert Feature to ArcGISFeature &lt;/SPAN&gt;


&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;                    &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mAttributeID &lt;/SPAN&gt;= &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mSelectedArcGISFeature&lt;/SPAN&gt;.getAttributes().get(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"objectid"&lt;/SPAN&gt;).toString();
                    &lt;SPAN style="color: #808080;"&gt;// get the number of attachments
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;                    &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;ListenableFuture&amp;lt;List&amp;lt;Attachment&amp;gt;&amp;gt; attachmentResults = &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mSelectedArcGISFeature&lt;/SPAN&gt;.fetchAttachmentsAsync();
                    attachmentResults.addDoneListener(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Runnable() {
                        &lt;SPAN style="color: #808000;"&gt;@Override
&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;                        &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;run() {
                            &lt;SPAN style="color: #000080; font-weight: bold;"&gt;try &lt;/SPAN&gt;{
                                &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;attachments &lt;/SPAN&gt;= &lt;SPAN style="color: #660e7a;"&gt;attachmentResults&lt;/SPAN&gt;.get();
                                Log.&lt;SPAN&gt;d&lt;/SPAN&gt;(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"number of attachments :"&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;attachments&lt;/SPAN&gt;.size() + &lt;SPAN style="color: #008000; font-weight: bold;"&gt;""&lt;/SPAN&gt;);
                                &lt;SPAN style="color: #808080;"&gt;// show callout with the value for the attribute "typdamage" of the selected feature
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;                                &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mSelectedArcGISFeatureAttributeValue &lt;/SPAN&gt;= (String) &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mSelectedArcGISFeature&lt;/SPAN&gt;.getAttributes().get(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"typdamage"&lt;/SPAN&gt;);
                                &lt;SPAN style="color: #000080; font-weight: bold;"&gt;if &lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;progressDialog&lt;/SPAN&gt;.isShowing()) {
                                    &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;progressDialog&lt;/SPAN&gt;.dismiss();
                                }
                                showCallout(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mSelectedArcGISFeatureAttributeValue&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;attachments&lt;/SPAN&gt;.size(),&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mapPoint&lt;/SPAN&gt;);
                                Toast.&lt;SPAN&gt;makeText&lt;/SPAN&gt;(MainActivity.&lt;SPAN style="color: #000080; font-weight: bold;"&gt;this&lt;/SPAN&gt;, getApplication().getString(R.string.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;info_button_message&lt;/SPAN&gt;), Toast.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;LENGTH_SHORT&lt;/SPAN&gt;).show();
                            } &lt;SPAN style="color: #000080; font-weight: bold;"&gt;catch &lt;/SPAN&gt;(Exception e) {
                                Log.&lt;SPAN&gt;e&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;TAG&lt;/SPAN&gt;, e.getMessage());
                            }
                        }
                    });

                } &lt;SPAN style="color: #000080; font-weight: bold;"&gt;else &lt;/SPAN&gt;{
                    Toast.&lt;SPAN&gt;makeText&lt;/SPAN&gt;(MainActivity.&lt;SPAN style="color: #000080; font-weight: bold;"&gt;this&lt;/SPAN&gt;, &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"No states found with name: " &lt;/SPAN&gt;+ &lt;SPAN style="color: #660e7a;"&gt;searchString&lt;/SPAN&gt;, Toast.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;LENGTH_SHORT&lt;/SPAN&gt;).show();
                }
            } &lt;SPAN style="color: #000080; font-weight: bold;"&gt;catch &lt;/SPAN&gt;(Exception e) {
                Toast.&lt;SPAN&gt;makeText&lt;/SPAN&gt;(MainActivity.&lt;SPAN style="color: #000080; font-weight: bold;"&gt;this&lt;/SPAN&gt;, &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Feature search failed for: " &lt;/SPAN&gt;+ &lt;SPAN style="color: #660e7a;"&gt;searchString &lt;/SPAN&gt;+ &lt;SPAN style="color: #008000; font-weight: bold;"&gt;". Error=" &lt;/SPAN&gt;+ e.getMessage(),
                        Toast.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;LENGTH_SHORT&lt;/SPAN&gt;).show();
                Log.&lt;SPAN&gt;e&lt;/SPAN&gt;(getResources().getString(R.string.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;app_name&lt;/SPAN&gt;),
                        &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Feature search failed for: " &lt;/SPAN&gt;+ &lt;SPAN style="color: #660e7a;"&gt;searchString &lt;/SPAN&gt;+ &lt;SPAN style="color: #008000; font-weight: bold;"&gt;". Error=" &lt;/SPAN&gt;+ e.getMessage());
            }
        }
    });



}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:32:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/convert-queried-feature-to-arcgis-feature-arcgis/m-p/407852#M2780</guid>
      <dc:creator>ShanMGIS</dc:creator>
      <dc:date>2021-12-11T18:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Queried Feature to ArcGIS Feature - ArcGIS Android SDK</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/convert-queried-feature-to-arcgis-feature-arcgis/m-p/407853#M2781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have implemented given below code&amp;nbsp; and the issue got resolved now&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #ffffff; font-size: 8.4pt;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #660e7a;"&gt;mSelectedArcGISFeature &lt;/SPAN&gt;= (ArcGISFeature)result.iterator().next();&lt;/STRONG&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2019 12:52:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/convert-queried-feature-to-arcgis-feature-arcgis/m-p/407853#M2781</guid>
      <dc:creator>ShanMGIS</dc:creator>
      <dc:date>2019-02-11T12:52:49Z</dc:date>
    </item>
  </channel>
</rss>

