AnsweredAssumed Answered

Setting up HttpRequestConfiguration to ArcGIS Android SDK for security

Question asked by salihyalcin89 on Jan 6, 2016
Latest reply on Mar 28, 2016 by WCrick-esristaff

Hello everyone,


I am developing an app that uses some features of esri android sdk, I know there is some ways to provide security to my esri services (eg. user credentials , token etc.) So my question is another way to provide security.


Esri Android SDK has HttpRequestHandler to access to some features of HTTP requests.


HttpRequestHandler |  ArcGIS Android 10.2.7 API


In order to provide security I defined ArcGIS Server Link like below (Some places of link has been changed by me);


ArcGISTiledMapServiceLayer BaseMap = new ArcGISTiledMapServiceLayer(" );


Actually I have to send Header to HttpRequest for access my features and services. I could afford the write this functionality for code side but it didn't worked.


HttpRequestHandler mHttpRequest = HttpRequestHandler.getInstance();

mHttpRequest.setHttpRequestListener(new HttpRequestListener() {
   public void onRequestInterception(org.apache.http.HttpRequest httpRequest, org.apache.http.protocol.HttpContext httpContext) {

  httpRequest.addHeader("HTTP_REFERER", "Android SH");
  Header[] mheader = httpRequest.getAllHeaders();
   for (Header item : mheader) {
  Log.d("RequestHeader", "Headers-----" + item);
  Log.d("Contex", "RequestContext----" + httpContext);



So How could I solve this issue ? How canI send header parameter to http request  ?   Or stuff that I trying is not supported for this usage.

Dan O'Neill

Will Crick