|
POST
|
I would recommend updating to the latest 10.2.9 runtime as this has many security and vulnerability fixes included with it. Are you perhaps updating the array asynchronously and not waiting for the update operation to finish before calling applyEdits()? Thanks, Alexander
... View more
04-25-2017
05:39 AM
|
0
|
3
|
2114
|
|
POST
|
Hi Forrest Kaye, Does this work for you instead: Map<Long, FeatureResult> result = resultFuture.get();
for (Map.Entry<Long, FeatureResult> entry : result.entrySet()) {
long id = entry.getKey(); // parcel id
while (Object o : entry.getValue()) {
Feature feature = (Feature) o; // building
Map<String, Object> attrs = feature.getAttributes();
}
} It looks like when this was originally written, that there was an assumption that FeatureResult would have been Future<FeatureResult>. We can submit a documentation update but I just wanted confirmation first on whether not using the get method resolved your issue.
... View more
04-25-2017
05:29 AM
|
0
|
1
|
1283
|
|
POST
|
Are you getting a specific error? To update the attributes, I did the following: public class MainActivity extends AppCompatActivity {
ServiceFeatureTable sft;
Portal portal;
ListenableFuture<List<FeatureEditResult>> listListenableFuture;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
sft = new ServiceFeatureTable("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0");
sft.addDoneLoadingListener(new Runnable() {
@Override
public void run() {
Log.e("TEST", "Feature Loaded");
Feature feature = sft.createFeature();
feature.getAttributes().put("description", "DESCIPTION");
sft.addFeatureAsync(feature).addDoneListener(new Runnable() {
@Override
public void run() {
listListenableFuture = sft.applyEditsAsync();
listListenableFuture.addDoneListener(new Runnable() {
@Override
public void run() {
try {
for (FeatureEditResult featureEditResults : listListenableFuture.get()) {
Log.e("TEST", "Fetaure Edit Results");
Log.e("TEST", "ObjectID" +featureEditResults.getObjectId());
for (EditResult er : featureEditResults.getAttachmentResults()) {
Log.e("TEST", "OBID" + er.getObjectId());
}
}
} catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
}
}
});
}
});
}
});
sft.loadAsync();
}
}
You can certainly add geometry as necessary. Some more documentation that may help you can be found here: Edit features—ArcGIS Runtime SDK for Android | ArcGIS for Developers
... View more
04-21-2017
11:56 AM
|
2
|
1
|
3542
|
|
POST
|
Hi Maria gomez, This stack overflow answer may help you: android - How to set proxy server for gradle? - Stack Overflow Additionally, here is the grade resource for this issue: The Build Environment - Gradle User Guide Version 3.5 Thanks, Alexander
... View more
04-21-2017
07:53 AM
|
2
|
1
|
7058
|
|
POST
|
I don't see this mode currently available. Someone from the Runtime team might be able to comment on this. What you could do though, is load the layer but set the visibility to none. Then as the user queries for a feature or selects a feature, you can at that point change the visibility of the selected feature using this method. While this may not be ideal for your workflow, I believe that this may be a reasonable alternative. Hopefully, we will be able to get some feedback from a member of the runtime team regarding that method / feature you are looking for.
... View more
04-20-2017
11:23 AM
|
1
|
1
|
1519
|
|
POST
|
If you are planning on using the URL of the service directly, there should be no difference.
... View more
04-20-2017
11:11 AM
|
0
|
3
|
3542
|
|
POST
|
Glad to have helped! Could you go ahead and mark my answer as the correct answer? Thanks, Alexander
... View more
04-20-2017
10:46 AM
|
1
|
5
|
3542
|
|
POST
|
Here is a very quick sample of what I was able to do to edit an online feature service. public class MainActivity extends AppCompatActivity {
ServiceFeatureTable sft;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
sft = new ServiceFeatureTable("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0");
sft.addDoneLoadingListener(new Runnable() {
@Override
public void run() {
Log.e("TEST", "Feature Loaded");
Feature feature = sft.createFeature();
sft.addFeatureAsync(feature);
ListenableFuture<List<FeatureEditResult>> listListenableFuture = sft.applyEditsAsync();
try {
for (FeatureEditResult featureEditResults : listListenableFuture.get()) {
Log.e("TEST", "Fetaure Edit Results");
Log.e("TEST", "ObjectID" +featureEditResults.getObjectId());
}
} catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
}
}
});
sft.loadAsync();
}
} I hope this helps!
... View more
04-20-2017
09:23 AM
|
2
|
7
|
3542
|
|
POST
|
It looks like most of your questions were already answered on that site. For your third question, I am wondering if you had trouble with the moveGeodesic method? I am running the latest version of the runtime and this worked flawlessly for me: public class MainActivity extends AppCompatActivity {
ArcGISMap arcGISMap;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final MapView mapView = (MapView) findViewById(R.id.mapView);
arcGISMap = new ArcGISMap(Basemap.Type.LIGHT_GRAY_CANVAS, 0,0,10);
mapView.setMap(arcGISMap);
//This section can be customized for your needs. This is how I was able to move the point from an existing point
Point point = new Point(0,0,SpatialReferences.getWebMercator());
GraphicsOverlay go = new GraphicsOverlay(GraphicsOverlay.RenderingMode.DYNAMIC);
mapView.getGraphicsOverlays().add(go);
Symbol sms = new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.CIRCLE, Color.RED, 15);
go.getGraphics().add(new Graphic(point, sms));
LinearUnit meters = new LinearUnit(LinearUnitId.METERS);
AngularUnit ag = new AngularUnit(AngularUnitId.DEGREES);
Point point1 = GeometryEngine.moveGeodetic(point, 100000, meters, 15.00, ag, GeodeticCurveType.GEODESIC);
mapView.getGraphicsOverlays().get(0).getGraphics().add(new Graphic(point1, sms));
}
}
... View more
04-19-2017
06:17 AM
|
2
|
1
|
4412
|
|
POST
|
The Sync/SaveTheBaySync (FeatureServer) is a service that can be connected to via the ArcGIS Runtime for Android SDK. What you can do is using the ServiceFeatureTable| arcgis-android constructor, is construct a new ServiceFeatureTable and from that, you can construct a FeatureLayer passing the FeatureTable that you just constructed into the argument for FeatureLayer. From there, you can call the methods of createFeature(Map<String, Object> attributes, Geometry geometry) which will create a new feature locally and follow that up with an applyEditsAsync() which will then send those edits back to the server.
... View more
04-17-2017
06:33 AM
|
0
|
1
|
1573
|
|
POST
|
Based upon the links that you sent, I believe that you are working from 10.2.x version of the runtime rather than version 100. With that, you should be able to use the Geodesic Move method and build a point array which you can then use to build a polygon. If you are looking for resources to learn the ArcGIS Android Runtime API, I would encourage you to visit this site for 10.2.x: ArcGIS Runtime SDK for Android | ArcGIS for Developers And this site for runtime verison 100: ArcGIS Runtime SDK for Android | ArcGIS for Developers Runtime version 100 is the newer of the two APIs and it is recommended that if you are building a new application to start with this version of the runtime.
... View more
04-17-2017
06:09 AM
|
2
|
3
|
4412
|
|
POST
|
Hi Aaron Dick, What you could do is when you launch the app, is load your stored serialized credentials and using a new UserCredentials class UserCredentials | ArcGIS Android 10.2.9 API, all the setUserAccount(String userName, String password) method and then subsequently call the getToken() method on the object so you can get a new valid token. You look to be trying to generate a token manually through a rest call but using the SDK might be a better way to go here. Thanks, Alexander
... View more
04-14-2017
08:28 AM
|
0
|
1
|
1403
|
|
POST
|
Hi punhani.lakshya, Are you referring to sending data from an offline workflow or from a connected workflow? (i.e., internet connection available on the device or internet connection is not available on device while connected) Additionally, are you trying to build your own application or looking for an existing solution (we have the collector app which can assist with sending data back to server)? Finally, which version of the Android SDK are you interested in using? Thanks, Alexander
... View more
04-14-2017
08:13 AM
|
0
|
3
|
1573
|
|
POST
|
Hi Centerline Mapping, This documentation is the only other thing that I found. Time-aware layers—ArcGIS Runtime SDK for Android | ArcGIS for Developers Let me know if you need any other assistance. Thanks, Alexander
... View more
04-14-2017
08:11 AM
|
0
|
0
|
1910
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-15-2014 03:16 PM | |
| 1 | 01-06-2015 03:33 PM | |
| 1 | 12-02-2014 10:47 AM | |
| 1 | 07-15-2014 03:31 PM | |
| 1 | 09-23-2014 03:59 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|