public class BlaubotAndroidFactory extends BlaubotFactory
Blaubot
instances for Android.Constructor and Description |
---|
BlaubotAndroidFactory() |
Modifier and Type | Method and Description |
---|---|
static BlaubotAndroid |
createBlaubot(java.util.UUID appUuid,
IBlaubotDevice ownDevice,
IBlaubotAdapter adapter,
IBlaubotBeacon... beacons)
Creates a Blaubot instance from a given adapter and multiple beacons.
|
static BlaubotAndroid |
createBluetoothBlaubot(java.util.UUID appUUID)
Sets up a default
Blaubot instance using only bluetooth for discovery and network connections. |
static BlaubotAndroid |
createBluetoothBlaubotWithBluetoothAndNFCBeacon(java.util.UUID appUuid)
Creates a bluetooth driven blaubot intance using NFC and Bluetooth as beacons.
|
static BlaubotAndroid |
createBluetoothBlaubotWithMulticastBeacon(java.util.UUID appUUID,
int beaconPort,
int beaconBroadcastPort)
Sets up a default
Blaubot instance using only the bluetooth adapter. |
static BlaubotAndroid |
createBluetoothBlaubotWithNFCBeacon(java.util.UUID appUuid)
Creates a bluetooth driven blaubot intance using NFC as beacon.
|
static BlaubotAndroid |
createEthernetBlaubotWithBluetoothBeacon(java.util.UUID appUUID,
int acceptorPort,
java.net.InetAddress ownInetAddress)
Creates a blaubot instance using the bluetooth beacon and sockets to communicate.
|
static BlaubotAndroid |
createEthernetBlaubotWithNFCBeacon(java.util.UUID appUUID,
int acceptorPort,
java.net.InetAddress ownInetAddress)
Creates a blaubot instance using ethernet adapter and the NFC beacon.
|
static GeoLocationBeaconAndroid |
createWebSocketGeoLocationBeaconForAndroid(IBlaubotDevice ownDevice,
java.lang.String beaconServerHost,
int beaconServerPort)
Creates an android specific GeoLocationBeacon using WebSockets.
|
static BlaubotAndroid |
createWifiApWithBluetoothBeaconBlaubot(java.util.UUID appUUID,
ConnectivityManager connectivityManager,
WifiManager wifiManager,
int acceptorPort)
Sets up a default
Blaubot instance using Wifi by creating wifi access points and socket
connections. |
static BlaubotAndroid |
createWifiApWithNfcBeaconBlaubot(java.util.UUID appUUID,
ConnectivityManager connectivityManager,
WifiManager wifiManager,
int acceptorPort)
Sets up a default
Blaubot instance using Wifi by creating wifi access points and socket
connections. |
static BlaubotAndroid |
createWifiP2PBlaubot(java.util.UUID appUUID,
WifiP2pManager p2pWifiManager,
WifiManager wifiManager,
WifiP2pManager.Channel beaconChannel,
WifiP2pManager.Channel acceptorChannel)
Sets up a default
Blaubot instance using only the WIFIDirect adapter. |
createBlaubot, createBlaubotWebsocketAdapter, createBlaubotWebsocketServer, createBlaubotWebsocketServer, createBlaubotWebsocketServer, createEthernetBlaubot, createEthernetBlaubot, createEthernetBlaubotWithBonjourBeacon, createEthernetBlaubotWithFixedDevicesBeacon, createJsr82Adapter, createJsr82BluetoothBlaubot, createWebSocketBlaubotWithBonjourBeacon, createWebSocketBlaubotWithMulticastBeacon, createWebSocketGeoBeaconServer, createWebSocketGeoLocationBeacon, createWebSocketMetaDataDTO, createWebSocketServerConnector, getLocalIpAddress
public static GeoLocationBeaconAndroid createWebSocketGeoLocationBeaconForAndroid(IBlaubotDevice ownDevice, java.lang.String beaconServerHost, int beaconServerPort) throws java.lang.ClassNotFoundException
BlaubotFactory.createWebSocketGeoLocationBeacon(IBlaubotDevice, String, int)
.
In order to use this beacon, you have to host a GeoBeaconServer
.
Note that you have to put blaubot-websockets as a dependency to your project.ownDevice
- the ownDevice (Blaubot-Instance device)beaconServerHost
- the hostname or ip of the beacon serverbeaconServerPort
- the port on which the beacon server listensjava.lang.ClassNotFoundException
- if blaubot-websockets is not in the classpathpublic static BlaubotAndroid createEthernetBlaubotWithNFCBeacon(java.util.UUID appUUID, int acceptorPort, java.net.InetAddress ownInetAddress)
appUUID
- the app's uuidacceptorPort
- the port of the connector's accepting socketownInetAddress
- the own InetAddress
of the network to act onpublic static BlaubotAndroid createEthernetBlaubotWithBluetoothBeacon(java.util.UUID appUUID, int acceptorPort, java.net.InetAddress ownInetAddress)
appUUID
- the app's uuidacceptorPort
- the port of the connector's accepting socketownInetAddress
- the own InetAddress
of the network to act onpublic static BlaubotAndroid createBlaubot(java.util.UUID appUuid, IBlaubotDevice ownDevice, IBlaubotAdapter adapter, IBlaubotBeacon... beacons)
appUuid
- the app's unique uuidownDevice
- the own device containing this device's unique identifieradapter
- the adapter to be used (Sockets, WebSockets, Bluetooth, ...)beacons
- the becaons to be used (Bluetooth, NFC, Multicast, Bonjour, ...)public static BlaubotAndroid createBluetoothBlaubotWithMulticastBeacon(java.util.UUID appUUID, int beaconPort, int beaconBroadcastPort)
Blaubot
instance using only the bluetooth adapter.appUUID
- the app's unique uuidbeaconPort
- the port on which the beacon accepts connections via tcpbeaconBroadcastPort
- the port on which the beacons broadcasts and receives udp multicastspublic static BlaubotAndroid createBluetoothBlaubot(java.util.UUID appUUID)
Blaubot
instance using only bluetooth for discovery and network connections.appUUID
- the app's unique uuidpublic static BlaubotAndroid createBluetoothBlaubotWithNFCBeacon(java.util.UUID appUuid)
BlaubotAndroid
.appUuid
- the app's uuidpublic static BlaubotAndroid createBluetoothBlaubotWithBluetoothAndNFCBeacon(java.util.UUID appUuid)
BlaubotAndroid
.appUuid
- the app's uuidpublic static BlaubotAndroid createWifiP2PBlaubot(java.util.UUID appUUID, WifiP2pManager p2pWifiManager, WifiManager wifiManager, WifiP2pManager.Channel beaconChannel, WifiP2pManager.Channel acceptorChannel)
Blaubot
instance using only the WIFIDirect adapter.
WARNING: This experimental and not recommended in production environments.appUUID
- the app's unique uuidp2pWifiManager
- android's p2p wifi manager servicewifiManager
- the android wifi manager servicebeaconChannel
- the beaconChannel (wifip2p) to be used for beacon transmissionsacceptorChannel
- the acceptorChannel (wifip2p) on which connection are going to be acceptedpublic static BlaubotAndroid createWifiApWithNfcBeaconBlaubot(java.util.UUID appUUID, ConnectivityManager connectivityManager, WifiManager wifiManager, int acceptorPort)
Blaubot
instance using Wifi by creating wifi access points and socket
connections. Discovery is done by the NFC beacon.
WARNING: This experimental and not recommended in production environments.appUUID
- the app's unique uuidconnectivityManager
- the connectivity system servicewifiManager
- the android wifi manageracceptorPort
- the port to accept connections onpublic static BlaubotAndroid createWifiApWithBluetoothBeaconBlaubot(java.util.UUID appUUID, ConnectivityManager connectivityManager, WifiManager wifiManager, int acceptorPort)
Blaubot
instance using Wifi by creating wifi access points and socket
connections. Discovery is done by the Bluetooth beacon.
WARNING: This experimental and not recommended in production environments.appUUID
- the app's unique uuidconnectivityManager
- the connectivity system servicewifiManager
- the android wifi manageracceptorPort
- the port to accept connections on