public class ProximityService
extends Service
ProximityManager
.Modifier and Type | Class and Description |
---|---|
static class |
ProximityService.ServiceBinder |
Modifier and Type | Field and Description |
---|---|
static int |
MESSAGE_ATTACH_MONITORING_LISTENER
Message code informing about attaching monitoring listener.
|
static int |
MESSAGE_DETACH_MONITORING_LISTENER
Message code informing about detaching monitoring listener.
|
static int |
MESSAGE_FINISH_SCAN
Message code informing backing service to finish scan.
|
static int |
MESSAGE_INITIALIZE_SCAN
Message code informing backing service to intialize scan.
|
static int |
MESSAGE_RESTART_SCAN
Message code informing backing service that scan should be restarted.
|
static int |
MESSAGE_SCAN_STARTED
Message code informing backing service that BLE devices scan has started.
|
static int |
MESSAGE_SCAN_STOPPED
Message code informing backing service that BLE devices scan has stopped.
|
static int |
MESSAGE_SERVICE_RESPONSE_OK
The response message notifying that
ProximityManager 's request was handled successfully. |
static int |
MESSAGE_WORK_FINISHED
Message code informing service that scan has finished.
|
Constructor and Description |
---|
ProximityService() |
Modifier and Type | Method and Description |
---|---|
Handler |
getMessagingHandler()
Gets internal messaging handler.
|
ScanContext |
getScanContext(int proximityManagerId)
Gets scan context connected to proximity manager
|
protected boolean |
isScanning(int proximityManagerId)
Provides information whether BeaconService is in ranging.
|
IBinder |
onBind(Intent intent) |
void |
onCreate() |
void |
onDestroy() |
int |
onStartCommand(Intent intent,
int flags,
int startId) |
protected void |
updateState(int proximityManagerId,
com.kontakt.sdk.android.ble.service.ProximityService.State newState)
Updates BeaconService state.
|
public static final int MESSAGE_SCAN_STARTED
public static final int MESSAGE_SCAN_STOPPED
public static final int MESSAGE_RESTART_SCAN
public static final int MESSAGE_INITIALIZE_SCAN
public static final int MESSAGE_FINISH_SCAN
public static final int MESSAGE_ATTACH_MONITORING_LISTENER
ProximityManager
is scanning.public static final int MESSAGE_DETACH_MONITORING_LISTENER
public static final int MESSAGE_WORK_FINISHED
public static final int MESSAGE_SERVICE_RESPONSE_OK
ProximityManager
's request was handled successfully.public void onCreate()
public int onStartCommand(Intent intent, int flags, int startId)
public IBinder onBind(Intent intent)
public void onDestroy()
public ScanContext getScanContext(int proximityManagerId)
proximityManagerId
- the proximity manager idpublic final Handler getMessagingHandler()
protected boolean isScanning(int proximityManagerId)
protected void updateState(int proximityManagerId, com.kontakt.sdk.android.ble.service.ProximityService.State newState)
proximityManagerId
- the proximity manager idnewState
- the new state