org.openuat.channel.oob.j2me
Class J2MEVisualChannel

java.lang.Object
  extended by org.openuat.channel.oob.j2me.J2MEVisualChannel
All Implemented Interfaces:
OOBChannel

public class J2MEVisualChannel
extends java.lang.Object
implements OOBChannel

Implements the visual out of band channel for mobile devices. To transmit, it encodes and displays a message as a QR code. To receive, it takes a picture and decodes the QR code displayed by the other device.

Author:
Iulia Ion

Field Summary
protected  javax.microedition.lcdui.Canvas canvas
           
protected  javax.microedition.media.Player player
           
protected  javax.microedition.media.control.VideoControl videoControl
           
 
Fields inherited from interface org.openuat.authentication.OOBChannel
AUDIO_CHANNEL, BUTTON_CHANNEL, VIDEO_CHANNEL
 
Constructor Summary
J2MEVisualChannel(javax.microedition.lcdui.Display display, java.lang.Class appClass, javax.microedition.lcdui.CommandListener listener, javax.microedition.lcdui.Command back, javax.microedition.lcdui.Command success, javax.microedition.lcdui.Command failure)
           
 
Method Summary
 void capture()
           
 void close(boolean unconditional)
           
protected static javax.microedition.media.Player createPlayer()
           
 javax.microedition.media.Player getPlayer()
           
 javax.microedition.media.control.VideoControl getVideoControl()
           
 void handleDecodedText(com.google.zxing.Result theResult)
           
protected  void pauseApp()
           
 void setOOBMessageHandler(OOBMessageHandler handler)
           
 void showError(java.lang.String message)
           
 void showError(java.lang.Throwable t)
           
 void stop()
           
 void transmit(byte[] message)
          Displays a QR code enconding the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

canvas

protected javax.microedition.lcdui.Canvas canvas

player

protected javax.microedition.media.Player player

videoControl

protected javax.microedition.media.control.VideoControl videoControl
Constructor Detail

J2MEVisualChannel

public J2MEVisualChannel(javax.microedition.lcdui.Display display,
                         java.lang.Class appClass,
                         javax.microedition.lcdui.CommandListener listener,
                         javax.microedition.lcdui.Command back,
                         javax.microedition.lcdui.Command success,
                         javax.microedition.lcdui.Command failure)
Method Detail

getPlayer

public javax.microedition.media.Player getPlayer()

getVideoControl

public javax.microedition.media.control.VideoControl getVideoControl()

createPlayer

protected static javax.microedition.media.Player createPlayer()
                                                       throws java.io.IOException,
                                                              javax.microedition.media.MediaException
Throws:
java.io.IOException
javax.microedition.media.MediaException

pauseApp

protected void pauseApp()

close

public void close(boolean unconditional)

showError

public void showError(java.lang.Throwable t)

showError

public void showError(java.lang.String message)

handleDecodedText

public void handleDecodedText(com.google.zxing.Result theResult)

capture

public void capture()
Specified by:
capture in interface OOBChannel

setOOBMessageHandler

public void setOOBMessageHandler(OOBMessageHandler handler)
Specified by:
setOOBMessageHandler in interface OOBChannel

transmit

public void transmit(byte[] message)
Displays a QR code enconding the message.

Specified by:
transmit in interface OOBChannel
Parameters:
message - The message to be displayed as QR.

stop

public void stop()


2005-2009, Rene Mayrhofer.