org.openuat.channel.oob.j2me
Class J2MEVisualChannel
java.lang.Object
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
|
|
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)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
canvas
protected javax.microedition.lcdui.Canvas canvas
player
protected javax.microedition.media.Player player
videoControl
protected javax.microedition.media.control.VideoControl videoControl
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)
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.