Is it possible to disable 3G network via code? I know how to disable
3G using phone settings, but I want to do this via code. Is it
possible?

Our application is working fine on GPRS (2G) and sometimes on 3G ( it
depends on the strength of UMTS signal), but when the 3G signal is
week, network connection is stacked sometimes for 10-15 seconds. As
you may assume, it's critical for our game.

I am using a simple socket Tcp connection. You can see my code, which
is quite simple, below:


sc = javax.net.SocketFactory.getDefault().createSocket(serverAddress,
serverPort);
is = sc.getInputStream();
os = sc.getOutputStream();
//sender extent thread and do all network job
sender.setPriority(Thread.MAX_PRIORITY);
sender.start();


//Trying to read data

if (is != null)
        {
                availiable = is.available();
                if (availiable>=5)
                {
                        byte[] buf = new byte[5];
                        is.read(buf);
                                }



Everything is working fine on the emulator and on 2G, but with 3G I
sometimes get: 'is.available()=0' for 10 -15 seconds (I tested this
using device debugging).

It seems that 3G network isn't stable. It happend to most of our users
that downloaded our application from the android market.

Can anybody help me out here?

Thanks,
Andrew




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

Reply via email to