Android Open Source - BT-Connection-Template Constants






From Project

Back to project page BT-Connection-Template.

License

The source code is released under:

Apache License

If you think the Android project BT-Connection-Template listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.hardcopy.btctemplate.utils;
//  w w w  .  j ava 2s .c o  m
public class Constants {

  // Service handler message key
  public static final String SERVICE_HANDLER_MSG_KEY_DEVICE_NAME = "device_name";
  public static final String SERVICE_HANDLER_MSG_KEY_DEVICE_ADDRESS = "device_address";
  public static final String SERVICE_HANDLER_MSG_KEY_TOAST = "toast";
    
    // Preference
  public static final String PREFERENCE_NAME = "BTCTemplatePref";
  public static final String PREFERENCE_KEY_BG_SERVICE = "BackgroundService";
  public static final String PREFERENCE_CONN_INFO_ADDRESS = "device_address";
  public static final String PREFERENCE_CONN_INFO_NAME = "device_name";
  
    // Message types sent from Service to Activity
    public static final int MESSAGE_CMD_ERROR_NOT_CONNECTED = -50;
    
    public static final int MESSAGE_BT_STATE_INITIALIZED = 1;
    public static final int MESSAGE_BT_STATE_LISTENING = 2;
    public static final int MESSAGE_BT_STATE_CONNECTING = 3;
    public static final int MESSAGE_BT_STATE_CONNECTED = 4;
    public static final int MESSAGE_BT_STATE_ERROR = 10;
    
    public static final int MESSAGE_READ_ACCEL_DATA = 201;
    public static final int MESSAGE_READ_ACCEL_REPORT = 211;
    

  
  // Intent request codes
  public static final int REQUEST_CONNECT_DEVICE = 1;
  public static final int REQUEST_ENABLE_BT = 2;
  
}




Java Source Code List

com.hardcopy.btctemplate.DeviceListActivity.java
com.hardcopy.btctemplate.MainActivity.java
com.hardcopy.btctemplate.bluetooth.BluetoothManager.java
com.hardcopy.btctemplate.bluetooth.ConnectionInfo.java
com.hardcopy.btctemplate.bluetooth.TransactionBuilder.java
com.hardcopy.btctemplate.bluetooth.TransactionReceiver.java
com.hardcopy.btctemplate.contents.DBHelper.java
com.hardcopy.btctemplate.fragments.ExampleFragment.java
com.hardcopy.btctemplate.fragments.FragmentAdapter.java
com.hardcopy.btctemplate.fragments.IFragmentListener.java
com.hardcopy.btctemplate.fragments.LLSettingsFragment.java
com.hardcopy.btctemplate.service.BTCTemplateService.java
com.hardcopy.btctemplate.service.ServiceMonitoring.java
com.hardcopy.btctemplate.utils.AppSettings.java
com.hardcopy.btctemplate.utils.Constants.java
com.hardcopy.btctemplate.utils.Logs.java
com.hardcopy.btctemplate.utils.RecycleUtils.java