public class BigFinCommunicationService
extends android.app.Service
| Modifier and Type | Class and Description |
|---|---|
protected class |
BigFinCommunicationService.AcceptThread
This thread runs while listening for incoming connections.
|
protected class |
BigFinCommunicationService.ConnectedThread
This thread runs during a connection with a remote device.
|
protected class |
BigFinCommunicationService.ConnectThread
This thread runs while attempting to make an outgoing connection
with a device.
|
protected class |
BigFinCommunicationService.IncomingHandler |
START_CONTINUATION_MASK, START_FLAG_REDELIVERY, START_FLAG_RETRY, START_NOT_STICKY, START_REDELIVER_INTENT, START_STICKY, START_STICKY_COMPATIBILITYACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, AUDIO_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_ROUTER_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, TELEPHONY_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, UI_MODE_SERVICE, USB_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE| Constructor and Description |
|---|
BigFinCommunicationService() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
connect(android.bluetooth.BluetoothDevice device)
Start the ConnectThread to initiate a connection to a remote device.
|
protected void |
connected(android.bluetooth.BluetoothSocket socket,
android.bluetooth.BluetoothDevice device)
Start the ConnectedThread to begin managing a Bluetooth connection
|
protected void |
connectionFailed()
Indicate that the connection attempt failed and notify the UI Activity.
|
protected void |
connectionLost()
Indicate that the connection was lost and notify the UI Activity.
|
android.os.IBinder |
onBind(android.content.Intent intent) |
void |
onCreate() |
void |
onDestroy() |
protected void |
reset() |
protected void |
sendMessage(int what,
int arg1) |
protected void |
sendMessage(int what,
int arg1,
int arg2) |
protected void |
sendMessage(int what,
int arg1,
int arg2,
Object obj) |
protected void |
sendMessage(int what,
String key,
String value) |
protected void |
setState(int state)
Set the current state of the chat connection
|
protected void |
stop()
Stop all threads
|
protected void |
updateNotification(boolean connected) |
protected void |
write(byte[] out)
Write to the ConnectedThread in an unsynchronized manner
|
dump, getApplication, onConfigurationChanged, onLowMemory, onRebind, onStart, onStartCommand, onTaskRemoved, onTrimMemory, onUnbind, startForeground, stopForeground, stopSelf, stopSelf, stopSelfResultattachBaseContext, bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalFilesDir, getFilesDir, getFileStreamPath, getMainLooper, getObbDir, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getSystemService, getTheme, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, revokeUriPermission, sendBroadcast, sendBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendStickyBroadcast, sendStickyOrderedBroadcast, setTheme, setWallpaper, setWallpaper, startActivities, startActivities, startActivity, startActivity, startInstrumentation, startIntentSender, startIntentSender, startService, stopService, unbindService, unregisterReceiverpublic static final int STATE_NONE
public static final int STATE_LISTEN
public static final int STATE_CONNECTING
public static final int STATE_CONNECTED
public static final int MESSAGE_STATE_CHANGE
public static final int MESSAGE_READ
public static final int MESSAGE_WRITE
public static final int MESSAGE_DEVICE_NAME
public static final int MESSAGE_CONNECTION_LOST
public static final int MESSAGE_CONNECTION_FAILED
public static final int MESSAGE_REGISTER_CLIENT
public static final int MESSAGE_UNREGISTER_CLIENT
public static final int MESSAGE_CONNECT_DEVICE
public static final int MESSAGE_SEND_DATA
public static final int MESSAGE_DISCONNECT_DEVICE
public static final String DEVICE_NAME
public static final String TOAST
public static final String DEVICE_ADDRESS
public static final String DATA_TO_SEND
protected android.bluetooth.BluetoothAdapter mAdapter
protected BigFinCommunicationService.AcceptThread mAcceptThread
protected BigFinCommunicationService.ConnectThread mConnectThread
protected BigFinCommunicationService.ConnectedThread mConnectedThread
protected int mState
protected List<android.os.Messenger> mClients
protected final android.os.Messenger mMessenger
protected android.support.v4.app.NotificationCompat.Builder notificationBuilder
public void onCreate()
onCreate in class android.app.Servicepublic void onDestroy()
onDestroy in class android.app.Servicepublic android.os.IBinder onBind(android.content.Intent intent)
onBind in class android.app.Serviceprotected void updateNotification(boolean connected)
protected void sendMessage(int what,
int arg1)
protected void sendMessage(int what,
int arg1,
int arg2)
protected void sendMessage(int what,
int arg1,
int arg2,
Object obj)
protected void setState(int state)
state - An integer defining the current connection stateprotected void stop()
protected void reset()
protected void connect(android.bluetooth.BluetoothDevice device)
device - The BluetoothDevice to connectprotected void connected(android.bluetooth.BluetoothSocket socket,
android.bluetooth.BluetoothDevice device)
socket - The BluetoothSocket on which the connection was madedevice - The BluetoothDevice that has been connectedprotected void write(byte[] out)
out - The bytes to writeBigFinCommunicationService.ConnectedThread.write(byte[])protected void connectionFailed()
protected void connectionLost()
Copyright © 2013–2014 CodeLutin. All rights reserved.