Is anyone else getting bored of announced product releases that don't materialise ...

by lbcoder » Mon, 27 Apr 2009 22:34:11 GMT


Sponsored Links
 How does the operator matter? Buy the phone, stick in your card,
enjoy. This phone locking nonsense should die -- I will only ever buy
a phone if it is NOT LOCKED, either in OS or in operator.





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



Is anyone else getting bored of announced product releases that don't materialise ...

by JP » Tue, 28 Apr 2009 21:05:55 GMT


 For historic reasons. Sprint-Nextel/PCS and Verizon Wireless'/CDMA are
hopping alongside the GSM stack. AT&T/Cingular "just" a few years back
shut off CDPD. I'm not sure if they keep TDMA alive on some level.
This means consumers are conditioned to buy a phone that pretty much
only works on a single carrier. It's pretty mind boggling.  Common
sense dictates that consumer would want the opposite of exclusivity,
yet, every marketing campaign stresses "phone XYZ exclusive on ZYX"
and consumers buy the logic, hook and sinker.

As far as GSM-locks-need-to-go-away goes... this sure has been
discussed a multiplicity of our rants about Android (;->). If there's
anything the carriers are battling most it's informed consumers'
vision of "demoting" them to commodity status and being a "dumb pipe".
4G is showing early signs that carriers (Spring/Clearwire) might be
willing to go the BYOD commodity route but we'll see how that's going
to play out.




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


Sponsored Links


Is anyone else getting bored of announced product releases that don't materialise ...

by Androman » Tue, 28 Apr 2009 21:07:26 GMT


 I guess they already have their piece of cace on other markets and
want to get it in USA too.



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



Other Threads

1. Creating files/directories on SD CARD

I cannot create directories and files on sd card.

-------------------------------
This is the simple example:
-------------------------------
File sdcard = android.os.Environment.getExternalStorageDirectory();
File dir = new File(sdcard, "data/com.samples.fileio/");

Log.d("FileIOTest", "Directory: "+dir);

if(!dir.exists()) {
     Log.w("FileIOTest", "Directory does not exists");
     if(!dir.mkdirs())
          Log.e("FileIOTest", "Cannot create directories");
     else
          Log.d("FileIOTest", "Directory created");
}
-------------------------------
Log output:
-------------------------------
09-15 22:27:23.634: DEBUG/FileIOTest(5049): Directory: /sdcard/data/
com.samples.fileio
09-15 22:27:23.634: WARN/FileIOTest(5049): Directory does not exists
09-15 22:27:23.634: ERROR/FileIOTest(5049): Cannot create directories
-------------------------------

Directory /sdcard/data exists and has 'd---rwxr-x' permissions (both).
Why mkdirs() fails?

-- 

2. After an exception appears this exception keeps coming back until the program has been reset.

Hellow,

I am making a program that is capable of sending and receiving as a
server or a client. The program works but once I have an exception
(timeout because the client/server isn't initialized).

Example:
pc as server ==> on
android as client ==> connect, no problem
disable client and server
connect android client ==> timeout on socket
server ==> on
connect android client ==> same timeout message directly (without the
4500 ms delay)

I tried a lot of things but without the time out the program keeps
hanging and android asks if I want to close it or without the proper
catch exception it crashes (of course).

The code:

package muco.NetwerkServerClient;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class netwerkServerClient extends Activity {
  /** Called when the activity is first created. */
  /** Layout values*/
  EditText edit1;
  TextView text2;
  Button knop1, knop2, knop3, knop4, knop5, knop6, knop7, knop8;

  /** Save instance values*/

  /** Client values */
  Socket clientSocket = null;
  BufferedReader inClient = null;
  PrintWriter outClient = null;
  boolean clientInitialised = false;

  /** Server values */
  Socket serverSocket = null;
  ServerSocket server = null;
  BufferedReader inServer = null;
  PrintWriter outServer = null;
  boolean serverInitialised = false;

  /** Common network values */
  int port;
  int maxPort = 65535;
  String ip = null;
  int timeOut = 4500;

  boolean ipSet = false;
  boolean portSet = false;

  /** Values */


  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
        setContentView(R.layout.relative);

        edit1 = (EditText) findViewById(R.id.edit_1);

        knop1 = (Button) findViewById(R.id.knop_1);
        knop1.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
            knop1(v);
          }//public void onClick(View v)
    });//knop1.setOnClickListener(new View.OnClickListener()

        knop2 = (Button) findViewById(R.id.knop_2);
        knop2.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
                knop2(v);
          }//public void onClick(View v)
    });//knop2.setOnClickListener(new View.OnClickListener()

        knop3 = (Button) findViewById(R.id.knop_3);
        knop3.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
                knop3(v);
      }//public void onClick(View v)
    });//knop3.setOnClickListener(new View.OnClickListener()

        knop4 = (Button) findViewById(R.id.knop_4);
        knop4.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
            knop4(v);
          }//public void onClick(View v)
        });//knop4.setOnClickListener(new View.OnClickListener()

    knop5 = (Button) findViewById(R.id.knop_5);
        knop5.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
            knop5(v);
          }//public void onClick(View v)
        });//knop5.setOnClickListener(new View.OnClickListener()

        knop6 = (Button) findViewById(R.id.knop_6);
        knop6.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
            knop6(v);
          }//public void onClick(View v)
        });//knop6.setOnClickListener(new View.OnClickListener()

        knop7 = (Button) findViewById(R.id.knop_7);
        knop7.setOnClickListener(new View.OnClickListener() {
      public void onClick(View v) {
            knop7(v);
          }//public void onClick(View v)
    });//knop7.setOnClickListener(new View.OnClickListener()

        knop8 = (Button) findViewById(R.id.knop_8);
        knop8.setOnClickListener(new View.OnClickListener() {
      public void onClick(View v) {
            knop8(v);
          }//public void onClick(View v)
    });//knop8.setOnClickListener(new View.OnClickListener()

    text2 = (TextView) findViewById(R.id.text_2);
  }//  public void onCreate(Bundle savedInstanceState) {

  @Override
  public void onPause() {
    super.onPause();
  }//public void onPause()

  @Override
  public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
  }//public void onSaveInstanceState(Bundle outState

  @Override
  public void onRestoreInstanceState(Bundle outState) {
    super.onRestoreInstanceState(outState);
  }//public void onRestoreInstanceState(Bundle outState)

  @Override
  public void onDestroy() {
          super.onDestroy();
  }//public void onDestroy()

  void knop1(View v) {//inschakelen als server
    text2.setText(initServer(port));
  }//void knop1(View v)

  void knop2(View v) {//ip
    int temp = 0;
    if ((edit1.getText().toString()) != null) {
          ip = edit1.getText().toString();
          temp = ip.length();
          if(temp > 4) {
            text2.setText("Doel IP-adres is ingesteld op: " + ip + " Herstart
de service");
            ipSet = true;
          } else {
            text2.setText("IP-adres onjuist. Voer een IP-adres in, in de vorm
van xxx.xxx.xxx.xxx of gebruik de volledige netwerknaam van de
machine");
          }//else
          edit1.setText("");
        }
  }//void knop2(View v)

  void knop3(View v) {//poort
        text2.setText(setPort(edit1.getText().toString() ));
    edit1.setText("");
  }//void knop3(View v)

  void knop4(View v) {//send
        if(serverInitialised) {
                text2.setText(setServerText(edit1.getText().toString()));
    } else if(clientInitialised) {
        text2.setText(setClientText(edit1.getText().toString()));
    } else {
        text2.setText("Schakel de server of client in");
    }
    edit1.setText("");
  }//void knop3(View v)

  void knop5(View v) {//recieve
    if(serverInitialised) {
      text2.setText(getServerText());
    } else if (clientInitialised) {
      text2.setText(getClientText());
    } else {
      text2.setText("Schakel de server of client in");
    }

  }//void knop3(View v)

  void knop6(View v) {//close
    if(serverInitialised) {
        text2.setText(closeServer());
    } else if (clientInitialised) {
        text2.setText(closeClient());
    } else {
      text2.setText("Geen server of client geinitialiseerd");
    }//else if
  }

  void knop7(View v) {//inschakelen als client
          text2.setText(initClient(ip, port));
  }

  void knop8(View v) {
    ip = "192.168.10.47";
    port = 4444;
    ipSet = true;
    portSet = true;
    text2.setText("IP-adres ingesteld op: " + ip + "\n poort ingesteld
op: " + port + "\n Start de server of client");
  }//void knop8(View v)

  void restoreUIState() {

  }//restoreUIState()

  String initServer(int p) {
    String s = "";

    if(clientInitialised) {
      closeClient();
    }//if
    if(portSet) {
      try{
        server = new ServerSocket(p);
        server.setSoTimeout(timeOut);
        serverSocket = server.accept();
        serverSocket.setSoTimeout(timeOut);
      } catch (IOException e) {
        s = ("I/O error: fout bij het toewijzen van de sockets");
      }//try

          try{
            inServer = new BufferedReader(new
InputStreamReader(serverSocket.getInputStream()));
            outServer = new PrintWriter(serverSocket.getOutputStream(),
true);
        serverInitialised = true;
        ipSet = false;
        portSet = false;
        s = "Server voor poort: " + p + " succesvol gestart";
          } catch (IOException e) {
        s = "I/O error: fout bij het verkrijgen van de in- en
outstreams";
        serverInitialised = false;
          } catch (Exception e) {
        s = "Timeout error: fout bij het initialiseren van de in- en
outputstreams";
        ipSet = false;
        portSet = false;
        serverInitialised = false;
      }//try
    } else if (!portSet) {
      s = "Stel een poort in";
    } else {
      s = "Onbekende error bij het initialiseren van de server";
    }//if else
        return s;
  }//initServer(int p)

  String initClient(String i, int p) {
    String s = null;

    if (serverInitialised) {
        closeServer();
    }
    if(ipSet && portSet) {

      try{
        clientSocket = new Socket(i, p);
        clientSocket.setSoTimeout(timeOut);
      } catch (IOException e) {
        s = ("I/O error: fout bij het toewijzen van de socket");
      } catch (Exception e) {
        s = "Timeout error: fout bij het initialiseren van de socket";
      }//try

      try{
        outClient = new PrintWriter(clientSocket.getOutputStream(),
true);
        inClient = new BufferedReader(new
InputStreamReader(clientSocket.getInputStream()));
        clientInitialised = true;
        ipSet = false;
        portSet = false;
        s = "Client verbinding met " + i + ":" + p + " succesvol
gestart";
      } catch (UnknownHostException e) {
        s = ("IP-adres: " + i + ":" + p + " niet gevonden");
        clientInitialised = false;
      } catch (IOException e) {
        s = "IO error: kan geen IO verbinding maken met de server";
        clientInitialised = false;
      } catch (Exception e) {
        s = "Timeout error: fout bij het initialiseren de in- en
outputstreams";
        ipSet = false;
        portSet = false;
        clientInitialised = false;
      }//try
    }else if (!(ipSet && portSet)) {
      s = "Stel het IP-adres en de poort in";
    }else if((!ipSet) && portSet) {
      s = "Stel het IP-adres in)";
    }else if((!portSet) && ipSet) {
      s = "Stel een poort in";
    } else {
      s = "Onbekende error bij het initialiseren van de client";
    }//if else

    return s;
  }//void initClient(String i, int p)

  String closeServer() {
    String temp = "Server succesvol afgesloten";
    outServer.close();
    try {
      inServer.close();
      serverSocket.close();
      server.close();
    } catch (IOException e) {
      temp =("I/O error: fout bij het afsluiten van de sockets");
    }//try

    serverInitialised = false;
    return temp;
  }//void closeServer()

  String closeClient() {
    String temp = "Client succesvol afgesloten";
    outClient.close();
    try {
      clientSocket.close();
        } catch (IOException e) {
      temp = ("I/O error: clientSocket kan niet worden gesloten");
        }//try
    try {
          inClient.close();
        } catch (IOException e) {
      temp = ("I/O error: inClient bufferdReader kan niet worden
gesloten");
        }//try
        clientInitialised = false;
        return temp;
  }//void closeClient()

  String setPort(String s) {

    int temp = 0;
    String q = null;

    if (s.length() >= 1) {
      try {
            temp = Integer.parseInt(s);
            if((temp > 0) && (temp < (maxPort+1))) {
          port = temp;
          q = ("Doel poort ingesteld op: " + port + " Herstart de
service");
          portSet = true;;
        } else {
          q = (temp + " is geen geldige waarde. Kies een waarde tussen
1 en " + maxPort);
        }//if else
      } catch (NumberFormatException e) {
        q = "Onjuiste poortwaarde. Voer een poortwaarde in van 1 tot
en met " + maxPort + ". Gebruik alleen 0 - 9.";
      }//try
        } else {
          q = s + " is geen geldige poortwaarde. Voer een waarde in van 1
tot en met " + maxPort + ". Gebruik alleen 0 - 9.";
        }//if else

        return q;
  }//void setPort(String s)

  String setClientText (String s) {
    String temp = null;
    temp = edit1.getText().toString();
    outClient.println(temp);

    return (temp + " is verzonden naar: " + ip + ":" + port);
  }//String setClientText (String s) {

  String setServerText(String s) {
        outServer.println(s);
    return (s + " verzonden via poort:" + port);
  }//setText(String s)

  String getClientText() {
    String temp = null;
    try{
      temp = inClient.readLine();
      temp = (temp + " ontvangen van " + ip + ":" + port);
    } catch (IOException e){
      temp = ("IO error: Kan geen gegevens ontvangen op: " + ip + ":"
+ port);
    }return temp;
  }//String getClientText()

  String getServerText() {
    String s = null;
    String recieve = null;
        try{
      recieve = inServer.readLine();
      s = ("Ontvangen op poort " + port + ": " + recieve);
    } catch (IOException e) {
      s = ("I/O error: Kan geen gegevens ontvangen op poort: " +
port);
    }//try
    return s;
  }//void getText()

}//public class NetwerkSendRecieve extends Activity

-- 

3. xml transformation in android

4. Child activity lifetime in background

5. Urgent Opening for Android Developer in Austin, TX for Long Term

6. Intent filter to launch an application

7. HIRING: Android Software Engineer - Instructor (Full-time)