public class BlaubotAndroid extends Blaubot
Constructor and Description |
---|
BlaubotAndroid(IBlaubotDevice ownDevice,
BlaubotUUIDSet uuidSet,
java.util.List<IBlaubotAdapter> adapters,
java.util.List<IBlaubotBeacon> beacons) |
Modifier and Type | Method and Description |
---|---|
void |
onNewIntent(Intent intent)
Used for blaubot components that need to react on incoming intents like the NFC-Beacon.
|
void |
onPause(Activity activity)
Used in blaubot components that need to be aware of the current lifecycle of foreground
activities (the NFC-Beacon, for example).
|
void |
onResume(Activity activity)
Used in blaubot components that need to be aware of the current lifecycle of the foreground activity
like the NFC beacon.
|
void |
registerReceivers(Context context)
Registers the needed
BroadcastReceiver s to the current context. |
void |
setContext(Context context)
Updates Blaubot components which need a context with the given context.
|
void |
unregisterReceivers(Context context)
Unregisters the
BroadcastReceiver s regsitered by registerReceivers. |
addLifecycleListener, close, createChannel, equals, getAdapters, getChannelManager, getConnectionManager, getConnectionStateMachine, getOwnDevice, getServerConnectionManager, getServerConnector, getUuidSet, hashCode, isStarted, removeLifecycleListener, setServerConnector, startBlaubot, stopBlaubot, toString
public BlaubotAndroid(IBlaubotDevice ownDevice, BlaubotUUIDSet uuidSet, java.util.List<IBlaubotAdapter> adapters, java.util.List<IBlaubotBeacon> beacons)
public void onPause(Activity activity)
activity
- the foreground activitypublic void onResume(Activity activity)
activity
- the foreground activitypublic void onNewIntent(Intent intent)
intent
- the new intentpublic void setContext(Context context)
context
- the context to be updatedpublic void registerReceivers(Context context)
BroadcastReceiver
s to the current context.
This method is recommended to be called inside the onResume() method of
an Activity
or Service
.context
- the current android contextpublic void unregisterReceivers(Context context)
BroadcastReceiver
s regsitered by registerReceivers.
This method is recommended to be called inside the onPause() method of
an Activity
or Service
.context
- the current android context