自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(0)
  • 资源 (1)
  • 收藏
  • 关注

空空如也

btjax蓝牙控制软件源码

自己做的蓝牙小车上位机软件,适合新手参考 super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE);//设置显示模式无顶部 setContentView(R.layout.button); text_show=(TextView)findViewById(R.id.text_show); edit_0=(EditText)findViewById(R.id.edit_0); Button button_send=(Button)findViewById(R.id.button_send); button_send.setOnClickListener(this); Button button_0=(Button)findViewById(R.id.button_0); button_0.setOnClickListener(this); Button button_1=(Button)findViewById(R.id.button_1); button_1.setOnClickListener(this); Button button_2=(Button)findViewById(R.id.button_2); button_2.setOnClickListener(this); Button button_3=(Button)findViewById(R.id.button_3); button_3.setOnClickListener(this); Button button_4=(Button)findViewById(R.id.button_4); button_4.setOnClickListener(this); button_connected=(Button)findViewById(R.id.button_connect);//后面他的响应事件会用到 if(mBluetoothAdapter==null){ Toast.makeText(this, "请确认当前设备有蓝牙功能!", Toast.LENGTH_SHORT).show(); finish(); return; } //在子线程里开启蓝牙 new Thread(){ @Override public void run() { // TODO Auto-generated method stub super.run(); if(!mBluetoothAdapter.isEnabled()){ Intent intentBluetooth_start=new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); startActivity(intentBluetooth_start); } } }.start();

2018-01-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除