|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.columbia.irt.mobiledyswis.BTSocket
public class BTSocket
Bluetooth Socket Plugin for PhoneGap
Constructor Summary | |
---|---|
BTSocket(Context parent,
java.lang.String id,
WebView appView,
java.lang.String macddr)
BTSocket Constructor |
Method Summary | |
---|---|
void |
close()
|
void |
destroy()
Clean up method. |
java.lang.String |
getId()
|
static BTSocket |
getInstance(Context parent,
java.lang.String id,
WebView appView,
java.lang.String macddr)
BTSocket instance getting method |
java.lang.String |
getLocalIpAddress()
Function to get the device's local IP address |
void |
init(java.lang.String btRemoteName)
Initialize this BTSocket instance. |
boolean |
isFailed()
Checking Bluetooth initialization |
boolean |
isReady()
Bluetooth connection check function |
void |
onMessage(java.lang.String msg)
JavaScript onMessage Event Handling Function |
void |
run()
|
void |
send(java.lang.String text)
Writes a bytestream to the server |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BTSocket(Context parent, java.lang.String id, WebView appView, java.lang.String macddr)
parent
- This parent context should be PhoneGap's Main ContextMethod Detail |
---|
public static BTSocket getInstance(Context parent, java.lang.String id, WebView appView, java.lang.String macddr)
parent
- This parent context should be PhoneGap's Main Contextid
- Unique ID for this instanceappView
- This should point the web view.macddr
- Bluetooth Mac Address to connect
public boolean isReady()
public boolean isFailed()
public void init(java.lang.String btRemoteName)
btRemoteName
- the name of the Bluetooth server device.public void destroy()
public void send(java.lang.String text)
text
- the bytes you wish to write.public final void onMessage(java.lang.String msg)
msg
- The actual message is sent to JavaScriptpublic void close()
public java.lang.String getLocalIpAddress()
public void run()
run
in interface java.lang.Runnable
public java.lang.String getId()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |