[android-developers] HttpURLConnection Bug ?

2012-09-21 Thread Giordano
Hi,

I'm using the HttpURLConnection class to send a request to web server
through a POST method and run into a really weird error.
There seems to be a specific message which causes an error with the
following stack trace:

libcore.io.ErrnoException: recvfrom failed: ECONNRESET (Connection
reset by peer)
   at libcore.io.Posix.recvfromBytes(Native Method)
   at libcore.io.Posix.recvfrom(Posix.java:131)
   at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:164)
   at libcore.io.IoBridge.recvfrom(IoBridge.java:513)
   ... 27 more

The message is correctly UrlEncoded before being sent to the
OutputStream, and the error doesn't depend on the message length nor
on the server application since I tried it both with Tomcat or with a
socket debugger on the server side. It seems instead to be caused by a
specific character included in the message at position 1476. If I
change that character before writing to the OutputStream the error
disappears. The error has been verified on 4.0.4. on a Galaxy Nexus
and 4.1.1 on Nexus S, but doesn't show up on the emulator.

I can send test code reproducing the bug on demand.

Thanks in advance for any help provided.

Giordano


-- 

--

Questa informativa è inserita in automatico dal sistema al fine esclusivo 
della realizzazione dei fini istituzionali dell'ente.

Diventa anche tu sponsor dei nostri ricercatori. Scegli di destinare il 5 
per mille all’Università di Pavia <http://www.unipv.it/>: offrirai nuove 
opportunità alla ricerca, ai giovani e al territorio. Un gesto che non 
costa nulla e costruisce tanto. C.F. dell’Università di Pavia 80007270186.

Please note that the above message is addressed only to individuals filing 
Italian income tax returns.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] [IPC] Return custom objects tree

2010-08-23 Thread Giordano
Hi everyone :)

it's the first message I post in this group, even though I lurked and
posted from time to time in #android-dev.
I have a question about  IPC.

At work we are developing 2 applications:
1 - a service running in background and preparing some data.
2 - an application that takes the data from the service and uses it
for something.

The problem is that service 1) should be able to pass an object like

class CustomObject{

   private AnotherCustomObject aco = new AnotherCustomObject();

   public AnotherCustomObject getObject(){
   return aco;
   }

}

and application 2) should be able to retrieve such object and call the
method getObject()

How do I achieve this? I was thinking of doing like so:
1) create an aidl file for AnotherCustomObject and for CustomObject.
Something like ICustomObject and IAnotherCustomObject.
2) on the service 1) side, make CustomObject implement ICustomObject
and Parcelable and AnotherCustomObject implement IAnotherCustomObject
and Parcelable and write the implementation of the methods.
3) on the application 2) side, import the aidl files and use the
automatically generated interfaces to manipulate the custom objects.

Is this the correct way to do this in your opinion? In point 2) should
I extend the stubs instead?

Thanks in advance for your hints.

Giordano


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en