Skip to content

StackOverflowError #11

Closed
Closed
@dre-pilipczuk

Description

@dre-pilipczuk

I'm trying to upload a Bitmap (grabbed from Camera). The Bitmap returned from the Camera intent is displayed on the screen so I know there is data to send. Get StackOverflowError at AsyncHttpClient.put (Unknown Source).

onActivityResult
Bitmap b = (Bitmap) data.getExtras().get("data");
profilePhoto.setImageBitmap(b);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
b.compress(CompressFormat.PNG, 85, bos);
onPhotoTaken(baos.toByteArray());

onPhotoTaken(byte[] ba)
AsyncHttpClient ahc = new AsyncHttpClient();
PersistentCookieStore pcs = new PersistentCookieStore(this);
RequestParams rp = new RequestParams();
rp.put("photo", new ByteArrayInputStream(ba));
ahc.setCookieStore(pcs);
c.put("php script address", rp, new AsyncHttpResponseHandler() {
@OverRide
public void onSuccess(String result) {
//Success Toast
}
@OverRide
public void onFailure(Throawable e) {
//Failure Toast
}
});

Probably something I'm doing wrong but can't spot it my side

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions