MediaPlayer stops playing when streaming over 3G on the Nexus One

by henrik » Fri, 23 Apr 2010 16:12:14 GMT


Sponsored Links
 


Another small thing:  It doesn't matter whether the Nexus One is
sleeping or not.  I happens even though I set the device and screen to
never sleep.

Henrik

--



MediaPlayer stops playing when streaming over 3G on the Nexus One

by henrik » Fri, 23 Apr 2010 18:35:36 GMT


 


Here's another thing.  When I'm on 3G on the Nexus One, I get a
SocketException when it starts buffering.  I guess I get a chunk of
the song, then it fails.  MediaPlayer also continuously call
onBufferingUpdate(), which doesn't happen on Wifi.

E/HttpServer( 1525): java.net.SocketException: The connection was
reset
E/HttpServer( 1525):    at
org.apache.harmony.luni.platform.OSNetworkSystem.receiveStreamImpl(Native
Method)
E/HttpServer( 1525):    at
org.apache.harmony.luni.platform.OSNetworkSystem.receiveStream(OSNetworkSystem.java:
478)
E/HttpServer( 1525):    at
org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java:
565)
E/HttpServer( 1525):    at
org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:
87)
E/HttpServer( 1525):    at
org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:
103)
E/HttpServer( 1525):    at
org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:
134)
E/HttpServer( 1525):    at
org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:
174)
E/HttpServer( 1525):    at
org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:
159)
E/HttpServer( 1525):    at
java.io.BufferedInputStream.read(BufferedInputStream.java:341)
E/HttpServer( 1525):    at
org.apache.http.entity.InputStreamEntity.writeTo(InputStreamEntity.java:
92)
E/HttpServer( 1525):    at
org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:
97)
E/HttpServer( 1525):    at
org.apache.http.impl.AbstractHttpServerConnection.sendResponseEntity(AbstractHttpServerConnection.java:
182)
E/HttpServer( 1525):    at
org.apache.http.protocol.HttpService.handleRequest(HttpService.java:
209)
E/HttpServer( 1525):    at my.player.http.HttpServer
$WorkerThread.run(HttpServer.java:93)

Best regards,
Henrik

--


Sponsored Links


MediaPlayer stops playing when streaming over 3G on the Nexus One

by henrik » Fri, 23 Apr 2010 19:45:47 GMT


 


I switched to our secondary streaming server, and things started to
work again.  I have no idea why, because it's supposed to be
identical.

Henrik

--



MediaPlayer stops playing when streaming over 3G on the Nexus One

by prabhakaran sambasivam » Fri, 23 Apr 2010 19:55:54 GMT


 *Avoid using so many threads that may leads to such kind of probs usually...
*




>



Other Threads

1. unable to send data to glassfish on netbeans

Hello,

I am trying to simple data from an Android service to a GlassFish
webserver on netbeans. But when I run the Android program, it sends
data but the servlet doesnt pick it up. I have given the correct
ip(10.0.2.2), added the path of the servlet in the web.xml file. I am
not sure what is going wrong. Could somebody please help me.

Servlet

protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
    throws ServletException, IOException, JSONException {
        response.setContentType("text/html;charset=UTF-8");
        System.out.println("Server Started Successfully");
        PrintWriter out = response.getWriter();
        try{
            System.out.println(request.getParameterNames());
            String param = request.getParameter("Hello");
            System.out.println(param+"is the stuff recieved");

             System.out.println("Recieved stuff:"+aList.toString());
             RequestDispatcher rd = request.getRequestDispatcher("/
MapMatchingServlet");
             rd.forward(request, response);

        } finally {
            out.close();
        }

    }

Android Service

Log.i(tag, "Started Get Coordinates");
                        URL url = new 
URL("http://10.0.2.2:28503/PNSServer/MainServlet");//
this is the localhost address
                        conn = url.openConnection();
                        conn.setDoOutput(true);
                        writer  = new 
OutputStreamWriter(conn.getOutputStream());
                scanner = new Scanner(new FileReader(new File("/sdcard/
inputdata.txt")));
                        Log.i(tag, "Read input data");
                       writer.write("Hello=yes");


Thanks,
raqz

-- 

2. List of "task killers"

Hi,

The so called "task killers" are sort of pain in my *** as users keep
using it w/o understanding it, so I decided to check installed
apps to find out if TK is installed and if so, warn the user about the
potential consequences. Anyone got by any chance list
of such apps (or packages) to share?

-- 

3. SD card Linux partition not recognized.

4. Differences between Android Button and JAVA buttons

5. Information regarding to565.c file

6. How to reliably terminate supporting threads

7. How do I make it so that if an SMS message fails to send, no dialogue pops up asking the user if they want to retry or cancel?