I\'ve an Android application that posting JSONObject
as a entity by using ByteArrayEntity
object. Here how it looks like:
post.setEntit
Android devices have a per-process memory limit. The default default is 24MB, but some devices have a lower value, eg 16MB or perhaps lower. The X10i appears to have 384MB RAM, which is low for a modern Android device (1GB is now standard), and this may place additional constraints.
I would suggest:
You may find that, just before you are making this call, you are already at the upper limit of memory; the initialisation of the HTTPClient and the call might take you just over the limit. This will be more likely if the OOM occurs on the first call.
If this happens only sporadically, or after a number of calls, you might have a memory leak. DDMS will help you track that down using the get allocations feature.