Skip to content

StackOverflowError #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dre-pilipczuk opened this issue Aug 11, 2011 · 1 comment
Closed

StackOverflowError #11

dre-pilipczuk opened this issue Aug 11, 2011 · 1 comment

Comments

@dre-pilipczuk
Copy link

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

@loopj
Copy link
Collaborator

loopj commented Aug 15, 2011

I think this issue was fixed with this pull request:
#9

I'll make a new jar soon which includes this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants