How can I disable the data connection?

by Erin Park » Fri, 10 Apr 2009 06:57:15 GMT


Sponsored Links
 Hi All,

It looks Android has the feature like "Always On" attempting the data
connection right after phone boots up and keeping the data connection
all the time.

is there any API to disable data connection? and then enable the data
connection?

B.Regards,

Erin.

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



How can I disable the data connection?

by Erin Park » Mon, 13 Apr 2009 12:08:22 GMT


 Hi all,

It looks android starts data connection right after phone boots up and
keeps the data connection until phone powers down.

Is there any API to disable data connection or enable data connection?

How can I do that?

B.regards,

Erin.

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Send video through socket and playing problem

Hi all,

I have two simple programmes, one server and one mediaplayer client,
both at localhost. The problem is I can send byte/text through the
socket, but when I try to send a video file, from the sdcard to the
socket, the client side mediaplayer cannot play it. Anyone know how to
solve this problem? What I send is just first few bytes of the video.
Do I need add some packet headers?Thanks.

Server:
            Socket client=serversocket.accept();
            System.out.println("accept");

            //Receive client message.
            BufferedReader in=new BufferedReader(new
InputStreamReader(client.getInputStream()));
            String str=in.readLine();
            System.out.println("read:"+str);

            //Send message to client.
            //PrintWriter out=new PrintWriter(new BufferedWriter(new
OutputStreamWriter(client.getOutputStream())),true);
            //out.println("server message");
            FileInputStream fis=new FileInputStream("/sdcard/
toystory3.3gp");
            byte buffer[]=new byte[2000];
            fis.read(buffer,0,20);
            DataOutputStream out=new
DataOutputStream(client.getOutputStream());
            out.write(buffer,0,20);
            in.close();
            out.close();
            client.close();
            System.out.println("close");

Client:
        Socket socket=new Socket("127.0.0.1",4444);
        String message="Initial"+"\r\n";
        //Send message to server.
        PrintWriter out=new PrintWriter(new BufferedWriter(new
OutputStreamWriter(socket.getOutputStream())),true);
        out.println(message);

        //Receive message from server.
        //BufferedReader br=new BufferedReader(new
InputStreamReader(socket.getInputStream()));
        //String msg=br.readLine();
        ParcelFileDescriptor pfd=ParcelFileDescriptor.fromSocket(socket);
        MediaPlayer m=new MediaPlayer();
        m.setDataSource(pfd.getFileDescriptor());
        m.prepare();
        m.start();

        /*if(msg!=null)
        {
                System.out.println("Data received.");
                System.out.println(msg);
        }
        else
        {
                System.out.println("Data not received.");
        }*/
        out.close();
        br.close();
        socket.close();

-- 

2. can we upgrade phone from 2.1 to 2.2

hello all,
i am planning to buy galaxy 3, which is having 2.1 eclairs sdk. so
after few days can we update the mobile sdk versions to the new
versions??? or we have to use 2.1 only for lifetime.
pls suggest me android phone.

-- 

3. How load jar file automatically by installing apk

4. How to convert JPEG file to PGM format in android ?

5. Process crash (signal 11) on image handling

6. Interpret Logcat Output

7. Change Activity in Tabs on Button Click