.geodatabase cannot save

4332
11
04-21-2014 10:19 PM
EdwardLin
New Contributor II
I use the .geodatabase in android, when I create new feature , but cannot save? Is same body help?
0 Kudos
11 Replies
RobertBurke
Esri Contributor
Hi Bluehy135,

Please, Can you describe your scenario?  Could you share some of the code and any error messages?

Are you following a workflow like the one described in the Edit Features Guide?

https://developers.arcgis.com/android/guide/edit-features.htm
0 Kudos
EdwardLin
New Contributor II
my problem is the feature can save? the fid return -1, I want know why?
  FeatureTable pFeatureTable = photoLayer.getFeatureTable();
  GeodatabaseFeatureTable pGdbFeatureTable = (GeodatabaseFeatureTable) pFeatureTable;

  // Create a feature with these attributes at the given point
  GeodatabaseFeature gdbFeature = new GeodatabaseFeature(attr, pGeom, pGdbFeatureTable);

  // Add the feature into the geodatabase table returning the
  // new feature ID
  long fid = pGdbFeatureTable.addFeature(gdbFeature);// return -1 ????
0 Kudos
RobertBurke
Esri Contributor
Hi

Please could you share the code showing how attr and pGeom are created?

GeodatabaseFeature(attr, pGeom, pGdbFeatureTable);

Also to the TableException (described at the URL below)  contain any error description?

https://developers.arcgis.com/android/api-reference/reference/com/esri/core/geodatabase/GeodatabaseF...
0 Kudos
EdwardLin
New Contributor II
I know, I am not license my app at Stand level, so it's not work...
0 Kudos
teamIgal
New Contributor III
Hi,

I also had a problem updating geodatabase in version 10.2.2 - because my geodatabase was created from the ArcMap (i have a complete offline applciation that i cannot connect to a service) - desktop pattern.

As i understood - this was "by design" like that.

Is that changed in the new version 10.2.3?
0 Kudos
DanO_Neill
Occasional Contributor III
I know, I am not license my app at Stand level, so it's not work...


You can use the entire API in developer mode.

I also had a problem updating geodatabase in version 10.2.2 - because my geodatabase was created from the ArcMap


Did you specifically create a Runtime Geodatabase?  You have to enable ArcGIS Runtime Tools in ArcMap to share as runtime content.
0 Kudos
teamIgal
New Contributor III


Did you specifically create a Runtime Geodatabase?  You have to enable ArcGIS Runtime Tools in ArcMap to share as runtime content.


Yes i created the geodatabase correctly. I am using the Arcgis Runtime for Android version 10.0 - and everything works there correctly.

But in version 10.2 (i tryed both with developer license and the full license) i can only open the geodatabase for read-only, and i cant add new features or update the features in the feature tables that i created from that geodatabase.

I saw in the SDK that this desktop pattern is best for read only use but as i see this it works only for read only use
0 Kudos
EdwardLin
New Contributor II
Hello, everybody! I really don't how to do...
I have the License only for developer, my *.geodatabase is local created by ArcGIS destop.
I want to save a new feature to my database, but I really don't know how to do?

FeatureTable pFeatureTable = photoLayer.getFeatureTable();
GeodatabaseFeatureTable pGdbFeatureTable = (GeodatabaseFeatureTable) pFeatureTable;

// Create a feature with these attributes at the given point
GeodatabaseFeature gdbFeature = new GeodatabaseFeature(attr, pGeom, pGdbFeatureTable);

// Add the feature into the geodatabase table returning the
// new feature ID
long fid = pGdbFeatureTable.addFeature(gdbFeature);


E/AndroidRuntime(10788):     java.lang.RuntimeException: The service does not have "create" capability.
E/AndroidRuntime(10788):  at com.esri.core.geodatabase.GeodatabaseFeatureTable.nativeAddFeature(Native Method)
E/AndroidRuntime(10788):  at com.esri.core.geodatabase.GeodatabaseFeatureTable.addFeature(Unknown Source)
0 Kudos
teamIgal
New Contributor III
Hello, everybody! I really don't how to do...
I have the License only for developer, my *.geodatabase is local created by ArcGIS destop.
I want to save a new feature to my database, but I really don't know how to do?

FeatureTable pFeatureTable = photoLayer.getFeatureTable();
GeodatabaseFeatureTable pGdbFeatureTable = (GeodatabaseFeatureTable) pFeatureTable;

// Create a feature with these attributes at the given point
GeodatabaseFeature gdbFeature = new GeodatabaseFeature(attr, pGeom, pGdbFeatureTable);

// Add the feature into the geodatabase table returning the
// new feature ID
long fid = pGdbFeatureTable.addFeature(gdbFeature);


E/AndroidRuntime(10788):     java.lang.RuntimeException: The service does not have "create" capability.
E/AndroidRuntime(10788):  at com.esri.core.geodatabase.GeodatabaseFeatureTable.nativeAddFeature(Native Method)
E/AndroidRuntime(10788):  at com.esri.core.geodatabase.GeodatabaseFeatureTable.addFeature(Unknown Source)


This is excatly the problem that i am facing.
It is working the same whether you have developer license or advanced license.
I think that the problem is the geodatabse - that was created in the ArcMap - and not via server.
0 Kudos