AnsweredAssumed Answered

Adding a feature to Geodatabase with Android v100.0 SDK

Question asked by MubalooTest on Feb 15, 2017

Hello! I'm struggling to figure out how to add a feature to a geodatabase table with the Android SDK. I'm doing the exact same stuff on the iOS SDK and the feature gets successfully added to the geodatabase, but doesn't work on Android. The iOS code is:

 

let featureTable = geodatabase.getdatabaseFeatureTable(withName: layer.rawValue)

 

featureTable.load { (error) in

   let feature = featureTable.createFeature(attributes: featureAttributes, geometry: mapPoint)

 

   feature.featureTable!.add(feature) { (error) in 

   // interestingly even though the feature gets added, this completion handler is never called, but that's for         another question

      guard let error = error else {

         print("added")

         return

 }

 

I tried converting this over to Android but even though I get the callback that the feature was added to the feature table, when I print out the number of features on the table it's still the same number as before. Can anyone provide me with a snippet of code for Android to add a feature to a geodatabase feature table?

 

Thanks

Outcomes