Motorola maxx V6 manual Draft Subject to Change 160/201

Models: maxx V6

1 201
Download 201 pages 31.32 Kb
Page 160
Image 160

Java ME Developer Guide

Chapter 22 - Network APIs

new runThread().start();

}

if((c == unregCommand) && (s == unregForm)){ mc = c;

ms = s;

new runThread().start();

}

if((c == backCommand) && (s == unregForm )){ display.setCurrent(mainForm);

}

if((c == backCommand) && (s == regForm )){ display.setCurrent(mainForm);

}

if((c == backCommand) && (s == messageForm)){ display.setCurrent(mainForm);

}

if((c == exitCommand) && (s == mainForm)){ destroyApp(false);

}

}

public class runThread extends Thread{ public void run(){

if((mc == unregCommand) && (ms == mainForm)){ try{

registeredConns = PushRegistry.listConnections(false); if(unregForm.size() > 0) unregForm.delete(0); registeredConnsCG = new ChoiceGroup("Connections", Choice-

Group.MULTIPLE, registeredConns, null); if(registeredConnsCG.size() > 0) unreg-

Form.append(registeredConnsCG);

else unregForm.append("No registered connections found."); display.setCurrent(unregForm);

} catch (Exception e) { showMessage("Unexpected " + e.toString() + ": " +

e.getMessage());

}

}

DRAFT - Subject to Change [160/201]

Page 160
Image 160
Motorola maxx V6 manual Draft Subject to Change 160/201