Android Open Source - BluetoothSppPro global Pool






From Project

Back to project page BluetoothSppPro.

License

The source code is released under:

Apache License

If you think the Android project BluetoothSppPro 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 mobi.dzs.android.BLE_SPP_PRO;
/*from w w w. j  a  v a  2s.  c o m*/
import mobi.dzs.android.bluetooth.BluetoothSppClient;
import mobi.dzs.android.storage.CJsonStorage;
import mobi.dzs.android.storage.CKVStorage;
import android.app.Application;

public class globalPool extends Application
{
  /**???SPP??????*/
  public BluetoothSppClient mBSC = null;
  /**?????????*/
  public CKVStorage mDS = null;
  /**
   * ????
   * */
  @Override
  public void onCreate(){
    super.onCreate();
    this.mDS = new CJsonStorage(this, getString(R.string.app_name));
  }
  
  /**
   * ???????
   * @param String sMac ?????????
   * @return boolean
   * */
  public boolean createConn(String sMac){
    if (null == this.mBSC)
    {
      this.mBSC = new BluetoothSppClient(sMac);
      if (this.mBSC.createConn())
        return true;
      else{
        this.mBSC = null;
        return false;
      }
    }
    else
      return true;
  }
  
  /**
   * ???????
   * @return void
   * */
  public void closeConn(){
    if (null != this.mBSC){
      this.mBSC.closeConn();
      this.mBSC = null;
    }
  }
}




Java Source Code List

mobi.dzs.android.BLE_SPP_PRO.BaseActivity.java
mobi.dzs.android.BLE_SPP_PRO.BaseCommActivity.java
mobi.dzs.android.BLE_SPP_PRO.actAbout.java
mobi.dzs.android.BLE_SPP_PRO.actByteStream.java
mobi.dzs.android.BLE_SPP_PRO.actCmdLine.java
mobi.dzs.android.BLE_SPP_PRO.actDiscovery.java
mobi.dzs.android.BLE_SPP_PRO.actKeyBoard.java
mobi.dzs.android.BLE_SPP_PRO.actMain.java
mobi.dzs.android.BLE_SPP_PRO.globalPool.java
mobi.dzs.android.bluetooth.BTSerialComm.java
mobi.dzs.android.bluetooth.BluetoothCtrl.java
mobi.dzs.android.bluetooth.BluetoothSppClient.java
mobi.dzs.android.bluetooth.CResourcePV.java
mobi.dzs.android.control.button.ButtonPassListener.java
mobi.dzs.android.control.button.RepeatingButton.java
mobi.dzs.android.storage.CJsonStorage.java
mobi.dzs.android.storage.CKVStorage.java
mobi.dzs.android.storage.CSharedPreferences.java
mobi.dzs.android.util.CHexConver.java
mobi.dzs.android.util.LocalIOTools.java