-
大小: 4.71MB文件类型: .rar金币: 1下载: 0 次发布日期: 2023-09-21
- 语言: Java
- 标签: 佳博 GprinterSDK 2.2 Android
资源简介
佳博 GprinterSDK 2.2 Android 最新SDK包 有心得有例子
代码片段和文件信息
package com.gprinter.sample;
import java.util.Set;
import com.sample.R;
import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.onclickListener;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
public class BluetoothDeviceList extends Activity {
// Debugging
private static final String DEBUG_TAG = “DeviceListActivity“;
public static LinearLayout deviceNamelinearLayout;
// Member fields
private ListView lvPairedDevice = null lvNewDevice = null;
private TextView tvPairedDevice = null tvNewDevice = null;
private Button btDeviceScan = null;
private BluetoothAdapter mBluetoothAdapter;
private ArrayAdapter mPairedDevicesArrayAdapter;
private ArrayAdapter mNewDevicesArrayAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
// requestWindowFeature(Window.FEATURE_CUSTOM_title);
setContentView(R.layout.dialog_bluetooth_list);
Log.e(DEBUG_TAG “On Create“);
// TextView �����?
tvPairedDevice = (TextView)findViewById(R.id.tvPairedDevices);
//ListView �����?
lvPairedDevice = (ListView)findViewById(R.id.lvPairedDevices);
// TextView �µ�
tvNewDevice = (TextView)findViewById(R.id.tvNewDevices);
// ListView �µ�
lvNewDevice = (ListView)findViewById(R.id.lvNewDevices);
// Button ɨ���豸
btDeviceScan = (Button)findViewById(R.id.btBluetoothScan);
btDeviceScan.setonclickListener(new onclickListener(){
@Override
public void onclick(View v) {
// TODO Auto-generated method stub
v.setVisibility(View.GONE);
discoveryDevice();
}
});
getDeviceList();
}
@Override
protected void onDestroy() {
super.onDestroy();
// Make sure we‘re not doing discovery anymore
if (mBluetoothAdapter != null) {
mBluetoothAdapter.cancelDiscovery();
}
// Unregister broadcast listeners
if(mFindBlueToothReceiver != null)
this.unregisterReceiver(mFindBlueToothReceiver);
}
protected void getDeviceList() {
// Initialize array adapters. One for already paired devices and
// one for newly discovered devices
mPairedDevicesArrayAdapter = new ArrayAdapter(this
R.layout.bluetooth_device_name_item);
mNewDevicesArrayAdapter = new ArrayAdapter(this
R.layout.bluetooth_de
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 246234 2016-05-20 11:08 GprinterSDKForAndroid\api docs.zip
文件 1036245 2015-03-11 15:34 GprinterSDKForAndroid\Gp2120TF中文编程手册.pdf
文件 982263 2015-03-11 15:34 GprinterSDKForAndroid\GP58中文编程手册.pdf
文件 175470 2016-06-23 09:14 GprinterSDKForAndroid\gprintersdkv22.jar
文件 355002 2016-07-02 11:47 GprinterSDKForAndroid\GprinterSDK使用手册.pdf
文件 445680 2016-06-24 10:20 GprinterSDKForAndroid\GpService.aidl说明.pdf
文件 491 2016-06-22 12:00 GprinterSDKForAndroid\工程Demo\GpSample\.classpath
文件 16 2016-06-21 12:49 GprinterSDKForAndroid\工程Demo\GpSample\.idea\.name
文件 686 2016-06-21 12:48 GprinterSDKForAndroid\工程Demo\GpSample\.idea\compiler.xm
文件 76 2016-06-21 12:48 GprinterSDKForAndroid\工程Demo\GpSample\.idea\copyright\profiles_settings.xm
文件 278 2016-06-21 12:49 GprinterSDKForAndroid\工程Demo\GpSample\.idea\libraries\gprintersdkv22.xm
文件 667 2016-06-21 12:49 GprinterSDKForAndroid\工程Demo\GpSample\.idea\libraries\libs.xm
文件 412 2016-06-21 12:49 GprinterSDKForAndroid\工程Demo\GpSample\.idea\libraries\_mylyn.xm
文件 1993 2016-06-24 10:24 GprinterSDKForAndroid\工程Demo\GpSample\.idea\misc.xm
文件 487 2016-06-21 12:49 GprinterSDKForAndroid\工程Demo\GpSample\.idea\modules.xm
文件 8792 2016-06-21 12:53 GprinterSDKForAndroid\工程Demo\GpSample\.idea\uiDesigner.xm
文件 164 2016-06-21 12:48 GprinterSDKForAndroid\工程Demo\GpSample\.idea\vcs.xm
文件 60036 2016-06-25 16:59 GprinterSDKForAndroid\工程Demo\GpSample\.idea\workspace.xm
文件 852 2016-05-05 09:57 GprinterSDKForAndroid\工程Demo\GpSample\.project
文件 57 2015-04-09 10:25 GprinterSDKForAndroid\工程Demo\GpSample\.settings\org.eclipse.core.resources.prefs
文件 598 2016-04-19 08:51 GprinterSDKForAndroid\工程Demo\GpSample\.settings\org.eclipse.jdt.core.prefs
文件 4733 2016-03-29 14:26 GprinterSDKForAndroid\工程Demo\GpSample\AndroidManifest.xm
文件 26 2016-03-22 15:05 GprinterSDKForAndroid\工程Demo\GpSample\assets\interval.properties
文件 2110 2016-06-24 16:38 GprinterSDKForAndroid\工程Demo\GpSample\GpSample(客显).iml
文件 51394 2015-03-13 10:10 GprinterSDKForAndroid\工程Demo\GpSample\ic_launcher-web.png
文件 424888 2016-07-11 10:03 GprinterSDKForAndroid\工程Demo\GpSample\libs\arm64-v8a\libgpequipment.so
文件 21912 2016-07-11 10:03 GprinterSDKForAndroid\工程Demo\GpSample\libs\armeabi\libgpequipment.so
文件 17824 2016-07-11 10:03 GprinterSDKForAndroid\工程Demo\GpSample\libs\armeabi-v7a\libgpequipment.so
文件 174366 2016-07-02 11:49 GprinterSDKForAndroid\工程Demo\GpSample\libs\gprintersdkv22.jar
文件 23630 2016-03-09 13:55 GprinterSDKForAndroid\工程Demo\GpSample\libs\jcc-bate-0.7.3.jar
............此处省略263个文件信息
相关资源
- Quartz 最新2.2.3版本所有jar包
- GprinterSDK forAndroid
- Unity蓝牙插件,最新版2019年10月7号更
- jaxws-rt-2.2.8.jar java webservice依赖包
- tcnative-1.dll(最新tomcat-native-1.2.21-op
- javax.faces-2.2.0.jar
- quartz2.2.1.jar quartz实现分时业务调度
- struts2-dojo-plugin-2.2.3.jar
- quartz2.2.0 jar包
- jodconverter-2.2.2 jar包
- jodconverter 2.2.2全面支持docx、xlsx
- Thermal_Config_tool_exe_v2.2.1945.4.rar
- spire.pdf.free-2.2.2.jar
- com.gargoylesoftware.htmlunit-2.29所需包
- GreenDao3.2.2的使用Demo
- android逆向助手 v2.2
- 哔哩哔哩漫画2.2.0
- GDAL 2.2.3 android .so库
- 移动代理服务器MAS短信API2.2开发手册
- GDALAndroid2.2.3库.rar
- Apache-cxf 2.2.8压缩包
- httpunit2.21jar及关联jar包
- tk.eclipse.plugin.htmleditor_2.2.0.jar,eclip
- hadoop-eclipse-plugin-2.2.0.jar
- GDAL 2.2.3 Android库
- android串口通讯无bug,供小伙伴们研究
- 蝙蝠在线考试系统 v2.2.6.rar
- Android Studio汉化包2.2.0及以上版本 官方
- ecplise html编辑器tk.eclipse.plugin.htmledi
- android-x86-2.2-generic.iso
评论
共有 条评论