<?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: How to add a feature in an existing GeodatabaseFeatureTable in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-add-a-feature-in-an-existing/m-p/415840#M2831</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My assumption is that it is probably not fully loaded yet (need to check with that team). &amp;nbsp;If you put this in at a different time, say after another button click, does it get inserted correctly?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Sep 2017 14:44:44 GMT</pubDate>
    <dc:creator>AlexanderNohe1</dc:creator>
    <dc:date>2017-09-13T14:44:44Z</dc:date>
    <item>
      <title>How to add a feature in an existing GeodatabaseFeatureTable</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-add-a-feature-in-an-existing/m-p/415839#M2830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to add a new feature&amp;nbsp;into an existing GeodatabaseFeatureTable but I get the following error when createFeature is called:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;com.esri.arcgisruntime.ArcGISRuntimeException: Cannot call this method in this context&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // create a new Geodatabase from local path
&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mGeodatabase &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Geodatabase(&lt;SPAN style="color: #660e7a;"&gt;mGeoDb&lt;/SPAN&gt;);
&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // load the geodatabase
&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mGeodatabase&lt;/SPAN&gt;.loadAsync();
&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // add feature layer from geodatabase to the ArcGISMap
&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mGeodatabase&lt;/SPAN&gt;.addDoneLoadingListener(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Runnable() {
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808000;"&gt;@Override
&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;run() {
&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: #000080; font-weight: bold;"&gt;for &lt;/SPAN&gt;(GeodatabaseFeatureTable geoDbTable : &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mGeodatabase&lt;/SPAN&gt;.getGeodatabaseFeatureTables()){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; java.util.Map&amp;lt;String, Object&amp;gt; attributes = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;HashMap&amp;lt;String, Object&amp;gt;();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; attributes.put(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"COD"&lt;/SPAN&gt;, &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"SIG"&lt;/SPAN&gt;); &lt;SPAN style="color: #808080;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&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&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Point gps = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Point(-&lt;SPAN style="color: #0000ff;"&gt;1.640235&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;48.127568&lt;/SPAN&gt;, SpatialReferences.&lt;SPAN&gt;getWgs84&lt;/SPAN&gt;());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Feature addedFeature = geoDbTable.createFeature(attributes, gps);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:50:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-add-a-feature-in-an-existing/m-p/415839#M2830</guid>
      <dc:creator>GaelDurand</dc:creator>
      <dc:date>2021-12-11T18:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a feature in an existing GeodatabaseFeatureTable</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-add-a-feature-in-an-existing/m-p/415840#M2831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My assumption is that it is probably not fully loaded yet (need to check with that team). &amp;nbsp;If you put this in at a different time, say after another button click, does it get inserted correctly?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 14:44:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-add-a-feature-in-an-existing/m-p/415840#M2831</guid>
      <dc:creator>AlexanderNohe1</dc:creator>
      <dc:date>2017-09-13T14:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a feature in an existing GeodatabaseFeatureTable</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-add-a-feature-in-an-existing/m-p/415841#M2832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to put the following code in an onClick method long after loading features, but the feature&amp;nbsp;doesn't appear. Do I need to use a SyncGeodatabaseTask? If that is the case, I have no clue how to code it...&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
java.util.Map&amp;lt;String, Object&amp;gt; attributes2 = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;HashMap&amp;lt;String, Object&amp;gt;();
attributes2.put(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"COD"&lt;/SPAN&gt;, &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"SIG"&lt;/SPAN&gt;); &lt;SPAN style="color: #808080;"&gt;// Coded Values: [0: No] , [1: Yes]
&lt;/SPAN&gt;Point gps = &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Point(-&lt;SPAN style="color: #0000ff;"&gt;1.640235&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;48.127568&lt;/SPAN&gt;, SpatialReferences.&lt;SPAN&gt;getWgs84&lt;/SPAN&gt;());
Feature addedFeature = &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mGeodatabase&lt;/SPAN&gt;.getGeodatabaseFeatureTable(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"CARTO_ETARE"&lt;/SPAN&gt;).createFeature(attributes2, gps);
&lt;SPAN style="color: #000080; font-weight: bold;"&gt;final &lt;/SPAN&gt;ListenableFuture&amp;lt;Void&amp;gt; addFeatureFuture = &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mGeodatabase&lt;/SPAN&gt;.getGeodatabaseFeatureTable(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"CARTO_ETARE"&lt;/SPAN&gt;).addFeatureAsync(addedFeature);
addFeatureFuture.addDoneListener(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;Runnable() {
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808000;"&gt;@Override
&lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;public void &lt;/SPAN&gt;run() {
&amp;nbsp;&amp;nbsp;&amp;nbsp; }

});&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:50:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/how-to-add-a-feature-in-an-existing/m-p/415841#M2832</guid>
      <dc:creator>GaelDurand</dc:creator>
      <dc:date>2021-12-11T18:50:53Z</dc:date>
    </item>
  </channel>
</rss>

