leejm98

I want using AttachmentInfo has problem or bug.

Discussion created by leejm98 on Dec 6, 2011
Latest reply on Jun 9, 2014 by rododanders
Hi,

I was using the ArcGIS for Android API to Java platform.

See the Rest Server:
     Has Attachments: true
     HTML Popup Type: esriServerHTMLPopupTypeAsHTMLText
     Object ID Field: OBJECTID

And, setting the Eclipse program:

featureLayer=(ArcGISFeatureLayer) mapView.findViewById(R.id.ksfieldsFLayer);
//why false message?
showMsg("get possible:"+featureLayer.hasAttachements(),2000);
//why not reading?
       featureLayer.queryAttachmentInfos(1, new CallbackListener<AttachmentInfo[]>() {
  
         @Override
   public void onError(Throwable tb) {
    // TODO Auto-generated method stub
    Log.e("Error message..",tb.getMessage());
    showMsg("why not!",2000);
   }
  
   @Override
   public void onCallback(AttachmentInfo[] attach) {
    // TODO Auto-generated method stub
   
    try {
     for(AttachmentInfo attachInfo : attach){
        showMsg("attachChk:"+attachInfo.toString(),2000);
     }
    } catch (Exception e) {
     // TODO: handle exception
    }         
   }
  });


I want to catch result. but, I think no read method. Somebody help....(T_T)
and why do callback see false from "FeatureLayer.hasAttachments()".

Outcomes