AnsweredAssumed Answered

Geodatabase Feature Table android methods returns inconsistent data

Question asked by rafael.luiz.fontana on Dec 7, 2017

Hello!

 

I'm trying to check if a feature table (from a geodatabase created in ArcMap 10.3 and also in 10.5, as described here http://desktop.arcgis.com/en/arcmap/10.3/map/working-with-arcmap/creating-arcgis-runtime-content.htm) has geometry, but it always returns false. The original .mxd file always have at least one layer with geometry. When I debugged the code I noticed that the data inside the tables was inaccessible. getType() returns "UNKNOW", getFields() returns null and so on.

 

Here's the sample code I followed from this link https://developers.arcgis.com/android/latest/sample-code/feature-layer-geodatabase.htm


FeatureLayer geometryLayer;
final Geodatabase localGeodatabase = new Geodatabase(geodatabasePath);

localGeodatabase.addDoneLoadingListener(new Runnable() {
    @Override
    public void run() {
        for(GeodatabaseFeatureTable featureTable : localGeodatabase.getGeodatabaseFeatureTables()) {
            if(featureTable.hasGeometry()){
                dataLayer = new FeatureLayer(featureTable);
                return;
            }
        }
    }
}

localGeodatabase.loadAsync();

 

Did I do something wrong?

 

I'm using API 100.1 for android

Outcomes