Hi,
I am new to Android so this maybe a stupid question but an answer would really help me.
I am developing a simple application that connects to a server. I need to run a while loop to receive the information from the server. I have a method called play() were the while loop is executed, play() is called in the onCreate(Bundle savedInstanceState) method. When I run the emulator the view for the page do not load. I believe this is because the while loop does not terminate and it cannot until I get some user interaction which I need the view for. How do I make the layout load and then run the play() method..
Here is code
java Code:
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.texasholdem);
try
{
play()
}
{
}
}
private void play()
{
boolean b = true
while(true)
{
..............
..............
if(msg.equals("end"))
{
b = false;
}
}
}