Search in sources :

Example 1 with GameProtocol

use of nfc.sample.tictactoe.protocol.GameProtocol in project Samples-for-Java by blackberry.

the class StartGameScreen method initNewGameMessaging.

public void initNewGameMessaging() {
    try {
        // send bid message over SNEP
        proto = new GameProtocol(this);
        my_bid = new ProtocolMessageMasterBid();
        proto.sendMasterBid(my_bid);
        proto.listenForMessages();
    } catch (NFCException e) {
        Utilities.log("XXXX StartGameScreen:" + e.getClass().getName() + ":" + e.getMessage());
        Utilities.popupMessage("Error: separate devices and try again!");
    }
}
Also used : ProtocolMessageMasterBid(nfc.sample.tictactoe.protocol.ProtocolMessageMasterBid) NFCException(net.rim.device.api.io.nfc.NFCException) GameProtocol(nfc.sample.tictactoe.protocol.GameProtocol)

Aggregations

NFCException (net.rim.device.api.io.nfc.NFCException)1 GameProtocol (nfc.sample.tictactoe.protocol.GameProtocol)1 ProtocolMessageMasterBid (nfc.sample.tictactoe.protocol.ProtocolMessageMasterBid)1