Recently received a request to use Android to initiate a print task, connect the printer via Bluetooth. The conditions are as follows:Printer: Nanjing Fujitsu dpk760e, with Bluetooth functionAndroid Phone: normal phone, Android 4.4 version, with Bluetooth functionSpecific operation:1. Bluetooth handshake2. Establishing
The previous articles are written in the mobile phone and mobile phone to communicate with each other through Bluetooth, this article began to talk about how to use Bluetooth technology to achieve the communication between the mobile phone and PC connection, the completion of this step we can further develop this communication on the basis of a computer-like control of the phone remote.
In fact, the author
Click event1 // Create a Connection object 2 Gkpeerpickercontroller *PPC = [[Gkpeerpickercontroller alloc] init]; 3 // Set up proxy 4 Ppc. delegate = self ; 5 // Show 6 [PPC show];Let the controller comply with the protocol1 @interface Viewcontroller () 23@endImplementation protocol1 -(void) Peerpickercontroller: (Gkpeerpickercontroller *) Picker Didconnectpeer: (NSString *) Peerid Tosession: (Gksession *) session2{3 4 }You can see that after the connection is succes
: (nsdata*) Data {NSLog (@"We got the data."); //receive data, set pushUilocalnotification *noti =[[Uilocalnotification alloc] init]; if(Noti) {//Setting the time zoneNoti.timezone =[Nstimezone Defaulttimezone]; //set the recurrence intervalNoti.repeatinterval =Nsweekcalendarunit; //Push SoundNoti.soundname =Uilocalnotificationdefaultsoundname; //contentNoti.alertbody =@"received the data."; Noti.alertaction=@"Open"; //The number of the red circle displayed on the iconNoti.applicationiconbadgenu
Bluetooth Development Summary
As long as the process of familiarity with Bluetooth, and the role of each role in Bluetooth, in fact, Bluetooth communication is not difficult to imagine
1. Bluetooth Center CBCentralM
With the Xamarin.form project nearing the end, a careful calculation only found over the past half a year time.In addition to the beginning of a leisurely write, during a variety of development pits, bosses pit, the state is not in the mood to write Bo, and now finally have time to summarize.Let's say Plugin.ble (Https://github.com/xabre/xamarin-bluetooth-le), search for
MFI ======= make for ipad, iphone, itouch devices for Apple devices ble = buletouch Low energy, Bluetooth 4.0 devices because of the power consumption, so also called ble peripheral,cent RAL = = Peripheral and center, initiating connected central, connected device for perilheral peripheral,central = = Peripheral and center, initiating connected central, connected device for PerilheralService and characteristic = = = Services and features each device p
[Video] basic learning-free Android development: Bluetooth chat room APP (3), androidapp
Basic Learning-free Android development: Lecture 3 of the Bluetooth chat room APP
3.1 ImageView and ImageButton controls3.2 details on the GridView Control3.3 SimpleAdapter3.4 event listener: OnItemClickListener3.5 input and di
0 Fundamentals Android Development: Bluetooth chat room App Third speaking3.1 ImageView, ImageButton control specific explanation3.2 GridView Control specific explanation3.3 Simpleadapter Adapter Specific explanation3.4 Event Listener: Onitemclicklistener3.5 entering and displaying emoji imagesWatch Online:http://www.3g-edu.org/news/video023.htmvideo Download:HTTP://PAN.BAIDU.COM/S/1KTMINQF "Video" 0 Fundam
this way. Next control the WiFi switch is very easy, as long as the simple call code can be implementedWifimanager manager =null;Manager = (Wifimanager) context.getsystemservice (Context.wifi_service);Manager.setwifienabled (false);Manager.setwifienabled (true);Switch to control BluetoothBluetoothadapter bluetoothadapter = Bluetoothadapter.getdefaultadapter ();Bluetoothadapter.disable ();Bluetoothadapter.enable ();Control flight mode, Google does not provide the relevant API, but we can through
Noti.soundname = Uilocalnotificationdefaultsoundname;
//Content
Noti.alertbody = @"received data";
Noti.alertaction = @"open";
//The number of the red circle displayed on the icon
Noti.applicationiconbadgenumber = 1;
//Set UserInfo to be used after subsequent revocation
Nsdictionary *infodic = [nsdictionary dictionarywithobject:@"name" forkey:@"key"];
Noti.userinfo = Infodic;
//Add push to UIApplication
UIApplication *app = [UIApplication sharedapplicat
Debug mobile phone and watch devices simultaneously using Bluetooth in Android Wear Development
During the development of Android Wear applications, you must simultaneously operate watches and mobile phones. You can simultaneously operate mobile phones and watches through Bluetooth.
1. Enable debugging settings for w
During the development of the Android Wear application, both the watch and the phone need to be operated simultaneously, and the phone and watch can be operated simultaneously via Bluetooth.1 turn on the watch and phone's debug settingsTurn on USB debugging for your phoneOpen the developer option for the Watch settings, check debug over Bluetooth if it is the fir
Previous articlesArticleThis article describes how to use the bluetooth technology to connect a mobile phone to a PC, after this step is completed, we can further develop a mobile phone remote control similar to a computer.
In fact, the author later I feel that this article is not much to write, the reason is that the difficulty of transferring from the mobile phone to the PC is not encoding, but j2se itself does not provide the Implementation of Th
Bluetooth development in Windows
A recent project requires Bluetooth development in windows, so I will introduce the environment setup and development steps here. I installed it in XP SP2, therefore, we will only introduce the installation on this platform:
First, Visual S
Mobile phone Bluetooth control relay wireless lock Iot Android source code android development Android WIFI control detailed annotation test stability no bug, android Android
I. functions:
1. Connect and disconnect Android WIFI, and save the connection IP address and port.
2. WIFI Control 3 Relays
3.16 sending commands, which can be sent in a single order and multiple messages, separated by commas.
4.16 hex
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.