|
POST
|
Aleksi, another suggestion for HTTP responses. A real quick way to verify if the request is being made is if you have access to your web server logs then run the refresh() and see if the HTTP request shows up in the log. -Andy
... View more
05-21-2012
01:08 PM
|
0
|
0
|
1045
|
|
POST
|
Aleksi, are you able to verify if there is a request/response when the refresh() method runs? And, did any errors show up in Logcat when the refresh() runs? If you don't know how to monitor HTTP requests for native Android apps, here's a blog post that should help: http://www.andygup.net/?p=695 -Andy
... View more
05-21-2012
01:03 PM
|
0
|
0
|
1045
|
|
POST
|
RE: debugging HTTP requests on Android here's a blog post that may help: http://www.andygup.net/?p=695 -Andy
... View more
05-21-2012
12:47 PM
|
0
|
0
|
1272
|
|
POST
|
@lcatania You may have already done this, did you compare the parameters set in your code with the parameters documented in your Geoprocessing Service REST endpoint? As a second suggestion, do you have another working sample that uses the same service that you can compare the HTTP request against? -Andy
... View more
05-21-2012
08:58 AM
|
0
|
0
|
2388
|
|
POST
|
Aleksi, can you clarify what the problem is? Typically if there is problem it will show up in Logcat when the app is loading/running. -Andy
... View more
05-17-2012
09:03 AM
|
0
|
0
|
1045
|
|
POST
|
Did you see any errors in the project or Logcat? Usually if an app doesn't load in the emulator there are either errors in the project, or errors that occurred during loading. -Andy
... View more
05-17-2012
08:58 AM
|
0
|
0
|
839
|
|
POST
|
Ah, right, because we don't currently support ZoomControls directly in com.esri.android.map.MapView. You set up a stand-alone ZoomControl and that's why the listener is returning your zoomButton as the scope. Got it. So, I was able to reproduce the behavior. While it's not exactly clear what's causing the problem, I suspect it's related to the View.OnClickListener and we'd have to dig deeper. As a temporary workaround, by simply setting up an OnZoomListener I was able to modify the behavior of the callout. When I implemented this pattern the callout seems to always hide() when using the ZoomControl, which isn't 100% ideal . Maybe you can work with something related to this for now, and give it a try? In the meantime, I'll submit an enhancement request that we look into working side-by-side with ZoomControls. map.setOnZoomListener(new OnZoomListener() {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void preAction(float pivotX, float pivotY, double factor) {
// TODO Auto-generated method stub
}
@Override
public void postAction(float pivotX, float pivotY, double factor) {
Log.d("test","test of the OnZoomListener");
}
});
... View more
05-16-2012
10:28 AM
|
0
|
0
|
1246
|
|
POST
|
Check the properties of the view object that's being passed by the View.OnClickListener. It's possible that listener is passing in a copy of the View which contains a different State. public void onClick(View v){
mMapView.zoomin();
}
versus public void onClick(View v){
v.zoomin();
} -Andy
... View more
05-15-2012
11:59 AM
|
0
|
0
|
1246
|
|
POST
|
Simon, I'm not familiar with this one, but I'm looking into whether it was a bug or not. -Andy
... View more
05-14-2012
08:56 AM
|
0
|
0
|
1687
|
|
POST
|
Mark, thanks for bringing that up as I was thinking the same thing right after I posted it. Yes, if you use Handler, rather than AsyncTask, you have to use the MessageQueue to send and handle messages relative to the main thread. For the benefit of others that read this and may be wondering when to use AsyncTask and when to use Handler: I suggest that AsyncTask is perfect for simple jobs such as a straight forward REST request/response. And, that you should consider using Handler for jobs that require an additional level of control, or advanced execution and processing. This was just a prototype sample, but I believe we do need to tweak it so that it shows how to loop information back into the UI thread and complete the cycle. If others have any experience with either of these please feel free to share what you have learned. -Andy
... View more
05-14-2012
07:28 AM
|
0
|
0
|
2388
|
|
POST
|
In addition to Mark's code snippet, here's some additional code taken from a Clip and Ship demo that shows another pattern for coding against an asynchronous GP service. The full sample code will be included with the v3 release of our SDK later this year. Or, if you want to see the full app sooner then ping me: agup at esri dot com. strmv.setParamName("Layers_to_Clip");
strmv.setValues(arrayList);
final ArrayList<GPParameter> paramlist = new ArrayList<GPParameter>();
paramlist.add(strmv);
paramlist.add(areaofinterest);
paramlist.add(featureformat);
handler = new Handler();
submitJobandPolling(gp, paramlist); /**
* Method submitJobandPolling.
* @param gp Geoprocessor
* @param params List<GPParameter>
*/
void submitJobandPolling(final Geoprocessor gp,
List<GPParameter> params) {
try {
GPJobResource gpjr1 = gp.submitJob(params);
JobStatus jobstatus = gpjr1.getJobStatus();
final String jobid = gpjr1.getJobID();
Log.d("Test", "jobid " + jobid);
Log.d("Test", "jobstatus " + jobstatus);
// if (!jobstatus.equals("esriJobSucceeded")) {
if (jobstatus != JobStatus.succeeded) {
handler.postDelayed(new Runnable() {
@Override
public void run() {
try {
GPJobResource gpjr2 = gp.checkJobStatus(jobid);
GPMessage[] messages = gpjr2.getMessages();
if ( messages!= null && messages.length > 0) {
for (int i = 0; i < messages.length; i++) {
Log.d("Test", "Message: " + messages.getDescription());
}
}
Log.d("Test", "Polling thread is: "
+ Thread.currentThread().getName());
JobStatus status = gpjr2.getJobStatus();
boolean jobcomplete = false;
if (status == JobStatus.canceled
|| status == JobStatus.deleted
|| status == JobStatus.failed || status == JobStatus.succeeded
|| status == JobStatus.timedOut) {
jobcomplete = true;
}
if (jobcomplete) {
if (status == JobStatus.succeeded) {
GPDataFile outputZipfile = (GPDataFile) gp
.getResultData(jobid, "Output_Zip_File");
Log.d("Test", "zip file is "
+ outputZipfile.getUrl().toURI()
.toString());
}else {
Log.d("Test", "GP failed");
}
} else {
handler.postDelayed(this, 5000);
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}, 4000);
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
... View more
05-11-2012
03:20 PM
|
0
|
0
|
2388
|
|
POST
|
@Simra, thanks, we're checking into it. I saw the same thing this morning. -Andy
... View more
05-11-2012
07:27 AM
|
0
|
0
|
511
|
|
POST
|
Hi Yohan, sweet! Any chance you have the app running somewhere that's publicly accessible, even if it's still a bit rough? I could give it a spin on a couple different devices. -Andy
... View more
05-10-2012
03:14 PM
|
0
|
0
|
2066
|
|
POST
|
Hi Kyle, There are three likely scenarios. 1) Configuring an ArcGIS Proxy and making sure it's working. This will allow your applications to access GIS services such as http://services.arcgisonline.com. My previous suggestions relate to this scenario. 2) Configuring your organization's network dmz/proxy/firewall. For this you'll have to talk to your organization's network/IT engineers. They will have to configure your network proxy, DMZ or firewall that allows connections between the ArcGIS Proxy and http://services.arcgisonline.com. 3) Configuring proxy access to your ArcGIS Server. You also mentioned you have ArcGIS Server. If you have external applications that need to access your ArcGIS Server GIS services, then you'll also have to work with your network/IT engineers. We consider this an enterprise-level, third party deployment and offer professional services to help architect and configure reverse proxy configurations. Here's a few links that can help with this scenario. Configure a reverse proxy system architecture with ArcGIS Server Configure a reverse proxy system architecture for ArcGIS Server with IIS 7 I hope that helps, -Andy
... View more
05-09-2012
07:10 AM
|
0
|
1
|
3586
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 08-01-2025 06:20 AM | |
| 1 | 05-27-2025 12:39 PM | |
| 1 | 04-23-2025 06:56 AM | |
| 1 | 04-23-2025 07:09 AM | |
| 1 | 04-08-2025 09:05 AM |
| Online Status |
Offline
|
| Date Last Visited |
12-05-2025
07:24 AM
|