登录
首页 » Android » android蓝牙通信源码

android蓝牙通信源码

于 2022-08-18 发布 文件大小:69.94 kB
0 38
下载积分: 2 下载次数: 1

代码说明:

仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • app首次使用向导
    应用背景对有着操作复杂或者有固定操作顺序的app首次打开的一个使用指导,有需要的可以借鉴一下关键技术采用FramLayout实现蒙层效果,以及在蒙层效果上实现的文字向导,和文字点击事件
    2022-03-18 00:47:32下载
    积分:1
  • 仿IOS 对话框
    package com.zf.iosdialog.widget;import android.app.Dialog;import android.content.Context;import android.view.Display;import android.view.LayoutInflater;import android.view.View;import android.view.View.OnClickListener;import android.view.WindowManager;import android.widget.Button;import android.widget.FrameLayout;import android.widget.ImageView;import android.widget.LinearLayout;import android.widget.LinearLayout.LayoutParams;import android.widget.TextView;import com.zf.iosdialog.R;public class AlertDialog {private Context context;private Dialog dialog;private LinearLayout lLayout_bg;private TextView txt_title;private TextView txt_msg;private Button btn_neg;private Button btn_pos;private ImageView img_line;private Display display;private boolean showTitle = false;private boolean showMsg = false;private boolean showPosBtn = false;private boolean showNegBtn = false;public AlertDialog(Context context) {this.context = context;WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);display = windowManager.getDefaultDisplay();}public AlertDialog builder() {// 获取Dialog布局View view = LayoutInflater.from(context).inflate(R.layout.view_alertdialog, null);// 获取自定义Dialog布局中的控件lLayout_bg = (LinearLayout) view.findViewById(R.id.lLayout_bg);txt_title = (TextView) view.findViewById(R.id.txt_title);txt_title.setVisibility(View.GONE);txt_msg = (TextView) view.findViewById(R.id.txt_msg);txt_msg.setVisibility(View.GONE);btn_neg = (Button) view.findViewById(R.id.btn_neg);btn_neg.setVisibility(View.GONE);btn_pos = (Button) view.findViewById(R.id.btn_pos);btn_pos.setVisibility(View.GONE);img_line = (ImageView) view.findViewById(R.id.img_line);img_line.setVisibility(View.GONE);// 定义Dialog布局和参数dialog = new Dialog(context, R.style.AlertDialogStyle);dialog.setContentView(view);// 调整dialog背景大小lLayout_bg.setLayoutParams(new FrameLayout.LayoutParams((int) (display.getWidth() * 0.85), LayoutParams.WRAP_CONTENT));return this;}public AlertDialog setTitle(String title) {showTitle = true;if ("".equals(title)) {txt_title.setText("标题");} else {txt_title.setText(title);}return this;}public AlertDialog setMsg(String msg) {showMsg = true;if ("".equals(msg)) {txt_msg.setText("内容");} else {txt_msg.setText(msg);}return this;}public AlertDialog setCancelable(boolean cancel) {dialog.setCancelable(cancel);return this;}public AlertDialog setPositiveButton(String text,final OnClickListener listener) {showPosBtn = true;if ("".equals(text)) {btn_pos.setText("确定");} else {btn_pos.setText(text);}btn_pos.setOnClickListener(new OnClickListener() {@Overridepublic void onClick(View v) {listener.onClick(v);dialog.dismiss();}});return this;}public AlertDialog setNegativeButton(String text,final OnClickListener listener) {showNegBtn = true;if ("".equals(text)) {btn_neg.setText("取消");} else {btn_neg.setText(text);}btn_neg.setOnClickListener(new OnClickListener() {@Overridepublic void onClick(View v) {listener.onClick(v);dialog.dismiss();}});return this;}private void setLayout() {if (!showTitle && !showMsg) {txt_title.setText("提示");txt_title.setVisibility(View.VISIBLE);}if (showTitle) {txt_title.setVisibility(View.VISIBLE);}if (showMsg) {txt_msg.setVisibility(View.VISIBLE);}if (!showPosBtn && !showNegBtn) {btn_pos.setText("确定");btn_pos.setVisibility(View.VISIBLE);btn_pos.setBackgroundResource(R.drawable.alertdialog_single_selector);btn_pos.setOnClickListener(new OnClickListener() {@Overridepublic void onClick(View v) {dialog.dismiss();}});}if (showPosBtn && showNegBtn) {btn_pos.setVisibility(View.VISIBLE);btn_pos.setBackgroundResource(R.drawable.alertdialog_right_selector);btn_neg.setVisibility(View.VISIBLE);btn_neg.setBackgroundResource(R.drawable.alertdialog_left_selector);img_line.setVisibility(View.VISIBLE);}if (showPosBtn && !showNegBtn) {btn_pos.setVisibility(View.VISIBLE);btn_pos.setBackgroundResource(R.drawable.alertdialog_single_selector);}if (!showPosBtn && showNegBtn) {btn_neg.setVisibility(View.VISIBLE);btn_neg.setBackgroundResource(R.drawable.alertdialog_single_selector);}}public void show() {setLayout();dialog.show();}}
    2015-01-03下载
    积分:1
  • IconFade仿微信主界面滑动和文字渐变-Android源码
    Android IconFade源码,仿微信主界面滑动效果,另外还实现了微信主界面底部的菜单和文字渐变效果,演示了制作微信界面需要创建的布局集合,包括了图标集合、文字集合、微信菜单索引、联系人菜单索引、发现菜单索引、我菜单索引和当前菜单索引,还定义了一些参数项,比如:   srcIndex 失去焦点的索引   destIndex 选中的索引   ratio 透明的比例   在手机上模拟运行后,手指在屏幕上左右滑动,可按照微信底部菜单的顺序切换界面,类似于TAB切换内容的效果。运行效果可参见截图所示。
    2022-03-02 08:21:32下载
    积分:1
  • 安卓文件浏览器的dEMO
    其实现的功能是,利用线程搜索某个文件夹下的所有文件,还可以以精确或模糊搜索文件和文件夹,其工作都是在线程中进行的,不影响当前操作。为了增强实用性,对于指定的文件可以有打开文件和打开文件所在的目录两种操作。本来想增加移动和复制操作,但是感觉有点画蛇添足,就作罢了
    2022-10-16 16:20:03下载
    积分:1
  • android listview实现复选框(checkboxlist) 例子源码下载设计
    android listview实现复选框(checkboxlist) 例子源码下载设计
    2015-05-05下载
    积分:1
  • android蓝牙通信源码
    仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,仅做参考,android蓝牙设备通信,
    2022-08-18 18:17:40下载
    积分:1
  • client
    Android手机图片上传客户端程序Android手机图片上传客户端程序(Android java app)
    2015-07-08 11:20:31下载
    积分:1
  • 第13章 Andriod三大动画
    这是一个用android studio 开发工具实现的动画效果 适合初学者学习(This is a Android Studio development tool to achieve the effect of animation for beginners to learn.)
    2018-11-13 11:44:00下载
    积分:1
  • 蓝牙寻找
    1.使用registerReceiver注册BroadcastReceiver来获取蓝牙状态、搜索设备等消息;2.使用BlueAdatper的搜索;3.在BroadcastReceiver的onReceive()里取得搜索所得的蓝牙设备信息(如名称,MAC,RSSI);4.通过设备的MAC地址来建立一个BluetoothDevice对象;5.由BluetoothDevice衍生出BluetoothSocket,准备SOCKET来读写设备;6.通过BluetoothSocket的createRfcommSocketToServiceRecord()方法来选择连接的协议/服务,这里用的是SPP(UUID:00001101-0000-1000-8000-00805F9B34FB);7.Connect之后(如果还没配对则系统自动提示),使用BluetoothSocket的getInputStream()和getOutputStream()来读写蓝牙设备。 
    2022-03-17 02:50:27下载
    积分:1
  • 安卓 象棋 源码
    安卓 象棋 源码 实现了 人机对战  代码比较简单  界面 美观大方
    2022-03-06 00:12:57下载
    积分:1
  • 696524资源总数
  • 103913会员总数
  • 34今日下载