CN109743692A - Acquisition methods, system and the computer readable storage medium of bluetooth hot spot information - Google Patents

Acquisition methods, system and the computer readable storage medium of bluetooth hot spot information Download PDF

Info

Publication number
CN109743692A
CN109743692A CN201811631748.6A CN201811631748A CN109743692A CN 109743692 A CN109743692 A CN 109743692A CN 201811631748 A CN201811631748 A CN 201811631748A CN 109743692 A CN109743692 A CN 109743692A
Authority
CN
China
Prior art keywords
bluetooth
hot spot
broadcast
spot information
characteristic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811631748.6A
Other languages
Chinese (zh)
Inventor
曾开发
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN201811631748.6A priority Critical patent/CN109743692A/en
Publication of CN109743692A publication Critical patent/CN109743692A/en
Pending legal-status Critical Current

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of acquisition methods of bluetooth hot spot information, monitor Bluetooth broadcast by Bluetooth broadcast receiver;After listening to Bluetooth broadcast, the bluetooth hot spot information in the Bluetooth broadcast is parsed, obtains bluetooth characteristic;The bluetooth characteristic is arranged to bluetooth hot spot attribute;Bluetooth hot spot attribute is read by system bottom, so that other application gets the relevant operation that bluetooth hot spot information executes bluetooth.The invention also discloses a kind of acquisition system of bluetooth hot spot information and a kind of computer readable storage mediums.The invention enables the bluetooth hot spot information only opened to system application layer, can also be obtained by system bottom, to allow system bottom according to the customized development of the bluetooth hot spot information realization Bluetooth function got.

Description

Acquisition methods, system and the computer readable storage medium of bluetooth hot spot information
Technical field
The present invention relates to field of electronic device more particularly to a kind of acquisition methods, system and the calculating of bluetooth hot spot information Machine readable storage medium storing program for executing.
Background technique
Bluetooth (Bluetooth) using more more and more universal, be widely used to mobile phone, portable computer, automobile, vertical The terminal devices such as body sound earphone, music player, TV, the customized development of bluetooth are also more taken seriously.
In Android (android) system, bluetooth hot spot information is only opened to system application layer at present, and application program can lead to It crosses bluetooth framework interface unlatching bluetooth and scans and obtain bluetooth hot spot information, to realize the correlation function of bluetooth.But system Bottom such as system Runtime Library layer, OEM vendor's customizable component, DVM virtual machine etc. cannot pass through bluetooth framework interface as application program Bluetooth hot spot information is obtained, so that cannot achieve the customized development of bluetooth correlation function.
Summary of the invention
The main purpose of the present invention is to provide a kind of acquisition methods of bluetooth hot spot information, system and computer-readable deposit Storage media, it is intended to the technical issues of system bottom can not obtain bluetooth hot spot information is solved, to realize that the customization of Bluetooth function is opened Hair.
To achieve the above object, the present invention provides a kind of acquisition methods of bluetooth hot spot information, comprising the following steps:
Bluetooth broadcast is monitored by Bluetooth broadcast receiver;
After listening to Bluetooth broadcast, the bluetooth hot spot information in the Bluetooth broadcast is parsed, obtains bluetooth characteristic;
The bluetooth characteristic is arranged to bluetooth hot spot attribute;
Bluetooth hot spot attribute is read by system bottom, executes bluetooth so that other application gets bluetooth hot spot information Relevant operation.
Preferably, before the monitoring Bluetooth broadcast step by Bluetooth broadcast receiver, comprising:
Bluetooth broadcast receiver is registered, and the type for monitoring Bluetooth broadcast is set, the type of the Bluetooth broadcast includes indigo plant Tooth hot spot discovery broadcast and the broadcast of the bluetooth end of scan;
The bluetooth open instructions of user's triggering is received, and starts bluetooth.
Preferably, described after listening to Bluetooth broadcast, the bluetooth hot spot information in the Bluetooth broadcast is parsed, is obtained blue The step of tooth characteristic includes:
Judge whether the Bluetooth broadcast monitored is bluetooth hot spot discovery broadcast;
If the Bluetooth broadcast monitored is bluetooth hot spot discovery broadcast, the bluetooth hot spot letter in the Bluetooth broadcast is parsed Breath obtains bluetooth characteristic.
Preferably, it is described judge monitor Bluetooth broadcast whether be bluetooth hot spot discovery Broadcast step after, further includes:
If the Bluetooth broadcast monitored is the broadcast of the bluetooth end of scan, then follow the steps: the bluetooth characteristic is arranged At bluetooth hot spot attribute.
Preferably, the described the step of bluetooth characteristic is arranged to bluetooth hot spot attribute, includes:
The bluetooth characteristic is integrated into corresponding character string;
Calling system attribute is arranged interface and the character string is arranged to bluetooth hot spot attribute.
Preferably, the bluetooth characteristic includes bluetooth title, signal strength and bluetooth protocol version.
In addition, to achieve the above object, the present invention also provides a kind of acquisition system of bluetooth hot spot information, the bluetooth heat The acquisition system of point information includes: memory, processor and is stored on the memory and can run on the processor Bluetooth hot spot information acquisition program, when the acquisition program of the bluetooth hot spot information is executed by the processor realize it is as follows Step:
Bluetooth broadcast is monitored by Bluetooth broadcast receiver;
After listening to Bluetooth broadcast, the bluetooth hot spot information in the Bluetooth broadcast is parsed, obtains bluetooth characteristic;
The bluetooth characteristic is arranged to bluetooth hot spot attribute;
Bluetooth hot spot attribute is read by system bottom, executes bluetooth so that other application gets bluetooth hot spot information Relevant operation.
Preferably, following steps are also realized when the acquisition program of the bluetooth hot spot information is executed by the processor:
Bluetooth broadcast receiver is registered, and the type for monitoring Bluetooth broadcast is set, the type of the Bluetooth broadcast includes indigo plant Tooth hot spot discovery broadcast and the broadcast of the bluetooth end of scan;
The bluetooth open instructions of user's triggering is received, and starts bluetooth.
Preferably, following steps are also realized when the acquisition program of the bluetooth hot spot information is executed by the processor:
Judge whether the Bluetooth broadcast monitored is bluetooth hot spot discovery broadcast;
If the Bluetooth broadcast monitored is bluetooth hot spot discovery broadcast, the bluetooth hot spot letter in the Bluetooth broadcast is parsed Breath obtains bluetooth characteristic.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage medium The acquisition program of bluetooth hot spot information is stored on storage medium, the acquisition program of the bluetooth hot spot information is executed by processor The step of acquisition methods of bluetooth hot spot information Shi Shixian described above.
The present invention monitors Bluetooth broadcast by Bluetooth broadcast receiver and parses the bluetooth after listening to Bluetooth broadcast Bluetooth hot spot information in broadcast obtains bluetooth characteristic, and the bluetooth characteristic is arranged to bluetooth hot spot attribute, Then bluetooth hot spot attribute is read by system bottom, so that other application gets the correlation that bluetooth hot spot information executes bluetooth Operation, so that the bluetooth hot spot information only opened to system application layer, can also be obtained by system bottom, thus make other application, Especially it is APK of non-application layer, such as system Runtime Library layer, middleware and DVM virtual machine etc., can be obtained by system bottom To the customized development of bluetooth hot spot information realization Bluetooth function.
Detailed description of the invention
Fig. 1 is the apparatus structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to;
Fig. 2 is the flow diagram of the acquisition methods first embodiment of bluetooth hot spot information of the present invention;
Fig. 3 is the flow diagram of the acquisition methods second embodiment of bluetooth hot spot information of the present invention;
Fig. 4 is the flow diagram of the acquisition methods 3rd embodiment of bluetooth hot spot information of the present invention;
Fig. 5 is the flow diagram of the acquisition methods fourth embodiment of bluetooth hot spot information of the present invention;
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The primary solutions of the embodiment of the present invention are: monitoring Bluetooth broadcast by Bluetooth broadcast receiver;It is listening to After Bluetooth broadcast, the bluetooth hot spot information in the Bluetooth broadcast is parsed, obtains bluetooth characteristic;By the bluetooth characteristic According to being arranged to bluetooth hot spot attribute;Bluetooth hot spot attribute is read by system bottom, so that other application gets bluetooth hot spot The relevant operation of information execution bluetooth.
Since bluetooth hot spot information is only opened to system application layer at present in the prior art, application program can pass through bluetooth frame Bridge joint mouth opens bluetooth and scans and obtain bluetooth hot spot information, but is located at the application software of non-application layer, for example be located at system Bottom cannot pass through bluetooth framework interface as application program and obtain bluetooth hot spot information, so that cannot achieve bluetooth correlation function The customized development of energy.
The present invention provides a solution, so that the bluetooth hot spot information only opened to system application layer, also can be Bottom of uniting obtains, to allow system bottom according to the customized development of the bluetooth hot spot information realization Bluetooth function got.
As shown in Figure 1, Fig. 1 is the apparatus structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to.
The terminal of that embodiment of the invention can be smart phone, tablet computer, wearable device, vehicle console, TV and The terminal device bluetooth-capable such as music player.
As shown in Figure 1, the terminal may include: processor 1001, such as CPU, communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein, communication bus 1002 is for realizing the connection communication between these components. User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional user interface 1003 can also include standard wireline interface and wireless interface.Network interface 1004 optionally may include that the wired of standard connects Mouth, wireless interface (such as WI-FI interface, hot spot interface).Memory 1005 can be high speed RAM memory, be also possible to stablize Memory (non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of preceding State the storage device of processor 1001.
Optionally, terminal can also include bluetooth module, RF (Radio Frequency, radio frequency) circuit, sensor, sound Frequency circuit, WI-FI module etc..Wherein, bluetooth module is used to scan bluetooth equipment, WI-FI information or the hot spot of near zone Information, user can carry out bluetooth connection with a certain bluetooth equipment, WI-FI or hot spot scanned according to actual needs.Sensor Such as optical sensor, motion sensor and other sensors.Specifically, optical sensor may include ambient light sensor and approach Sensor, wherein ambient light sensor can adjust the brightness of display screen according to the light and shade of ambient light, and proximity sensor can be When mobile terminal is moved in one's ear, display screen and/or backlight are closed.As a kind of motion sensor, acceleration of gravity senses Device can detect the size of (generally three axis) acceleration in all directions, can detect that size and the direction of gravity when static, can The application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating) of mobile terminal posture, Vibration identification phase for identification Close function (such as pedometer, percussion) etc.;Certainly, mobile terminal can also configure gyroscope, barometer, hygrometer, thermometer, red The other sensors such as outside line sensor, details are not described herein.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal of terminal structure shown in Fig. 1, can wrap It includes than illustrating more or fewer components, perhaps combines certain components or different component layouts.
As shown in Figure 1, as may include that operating system, network are logical in a kind of memory 1005 of computer storage medium Believe the acquisition program of module, Subscriber Interface Module SIM and bluetooth hot spot information.
In terminal shown in Fig. 1, network interface 1004 is mainly used for connecting background server, carries out with background server Data communication;User interface 1003 is mainly used for connecting client (user terminal), carries out data communication with client;And processor 1001 can be used for calling the acquisition program of the bluetooth hot spot information stored in memory 1005, and execute following operation:
Bluetooth broadcast is monitored by Bluetooth broadcast receiver;
After listening to Bluetooth broadcast, the bluetooth hot spot information in the Bluetooth broadcast is parsed, obtains bluetooth characteristic;
The bluetooth characteristic is arranged to bluetooth hot spot attribute;
Bluetooth hot spot attribute is read by system bottom, so that system bottom gets bluetooth hot spot information.
Further, before the monitoring Bluetooth broadcast step by Bluetooth broadcast receiver, comprising:
Bluetooth broadcast receiver is registered, the type of Bluetooth broadcast is monitored in setting, and the type of the Bluetooth broadcast includes bluetooth Hot spot discovery broadcast and the broadcast of the bluetooth end of scan;
The bluetooth open instructions of user's triggering is received, and starts bluetooth.
Further, described after listening to Bluetooth broadcast, the bluetooth hot spot information in the Bluetooth broadcast is parsed, is obtained The step of bluetooth characteristic includes:
Judge whether the Bluetooth broadcast monitored is bluetooth hot spot discovery broadcast;
If the Bluetooth broadcast monitored is bluetooth hot spot discovery broadcast, the bluetooth hot spot letter in the Bluetooth broadcast is parsed Breath obtains bluetooth characteristic.
Further, judge whether the Bluetooth broadcast monitored is after bluetooth hot spot finds Broadcast step, also to wrap described It includes:
If the Bluetooth broadcast monitored is the broadcast of the bluetooth end of scan, then follow the steps: the bluetooth characteristic is arranged At bluetooth hot spot attribute.
Further, the described the step of bluetooth characteristic is arranged to bluetooth hot spot attribute, includes:
The bluetooth characteristic is integrated into character string forms;
Calling system attribute is arranged interface and the character string is arranged to bluetooth hot spot attribute.
Further, the bluetooth characteristic includes bluetooth title, signal strength and bluetooth protocol version.
The acquisition methods of the specific embodiment of the acquisition device of bluetooth hot spot information of the present invention and following bluetooth hot spot information Each embodiment is essentially identical, and therefore not to repeat here.
Referring to Fig. 2, first embodiment of the invention provides a kind of acquisition methods of bluetooth hot spot information, comprising the following steps:
Step S10 monitors Bluetooth broadcast by Bluetooth broadcast receiver.
The present invention is suitable for smart phone, PC, tablet computer, MP3 (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio level 3) player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio level 4) player, portable computer, The terminal devices such as TV.Equipment includes bluetooth module and Bluetooth broadcast receiver, and after opening bluetooth, bluetooth can be to ambient enviroment Other bluetooth equipments and the shared information such as hot spot, WI-FI, audio data, operational order etc. of other bluetooth equipments carry out Scanning, when the information that other bluetooth equipments or other bluetooth equipments are shared is arrived in bluetooth scanning, system can be received to Bluetooth broadcast Device sends Bluetooth broadcast, and Bluetooth broadcast receiver monitors Bluetooth broadcast in real time, realizes the real-time prison to bluetooth module It surveys.In the present embodiment, when the shared hot spot of other bluetooth equipments of bluetooth scanning to ambient enviroment, Bluetooth broadcast can be sent extremely Bluetooth broadcast receiver.
Step S20 parses the bluetooth hot spot information in the Bluetooth broadcast after listening to Bluetooth broadcast, obtains bluetooth Characteristic.
Bluetooth broadcast receiver monitors Bluetooth broadcast in real time, and when listening to Bluetooth broadcast, system will receive this bluetooth Broadcast.Due to carrying the bluetooth hot spot information scanned in Bluetooth broadcast, terminal parses bluetooth hot spot information, can be with Obtain bluetooth characteristic, such as bluetooth title, signal strength and bluetooth protocol version.
The bluetooth characteristic is arranged to bluetooth hot spot attribute by step S30.
Since the bluetooth characteristic parsed in the prior art is only opened to system application layer, as system bottom such as system Runtime Library layer, OEM vendor's customizable component, DVM virtual machine can not get these bluetooth characteristics, therefore the present embodiment is by bluetooth Characteristic is arranged to the bluetooth hot spot attribute obtained by system bottom, and such system bottom is just capable of calling system property reading Interface gets the corresponding bluetooth characteristic of bluetooth hot spot attribute.
Attribute is a key property of Android system.Each attribute is a key-value pair (key/value pair), Type is all character string.Many application programs and library directly or indirectly rely on this characteristic, row when operation to determine them For.For example, adbd process querying attributes service has confirmed that currently whether operate in simulator environment.It can pass through SystemProperties.set () interface is configured the character string of bluetooth characteristic, creates and modification android Attribute is with Systemproperties.set (name, value), and wherein the title of android attribute is that have certain format to want Ask, it is as follows: prefix must with system core init prefix defined in property_service.c, carry out attribute The program of setting must also have system or root authority.Property Name used in Property system has certain name rule Then.If Property Name is considered as read only attribute with " ro. " beginning, this attribute.Once setting, attribute value cannot change Become.If Property Name is with " persist. " beginning, when this attribute is arranged, value is also by write-in/data/property. If Property Name is with " net. " beginning, when this attribute is arranged, " net.change " attribute will be arranged automatically, to be added The attribute-name modified to the end.Attribute " ctrl.start " and " ctrl.stop " are for starting and stopping service.
Step S40 reads bluetooth hot spot attribute by system bottom, holds so that other application gets bluetooth hot spot information The relevant operation of row bluetooth.
Can then it pass through positioned at other application of non-application layer, such as system Runtime Library layer, middleware and DVM virtual machine etc. SystemProperties.get () interface is read out the bluetooth characteristic in system bottom, obtains android and belongs to Property can return to the bluetooth characteristic with Systemproperties.get (name).
The present invention monitors Bluetooth broadcast by Bluetooth broadcast receiver and parses the bluetooth after listening to Bluetooth broadcast Bluetooth hot spot information in broadcast obtains bluetooth characteristic, and the bluetooth characteristic is arranged to bluetooth hot spot attribute, Then bluetooth hot spot attribute is read by system bottom, to get the phase that bluetooth hot spot information executes bluetooth for other application Operation is closed, so that the bluetooth hot spot information only opened to system application layer, can also be obtained by system bottom, so that other be made to answer With being especially APK of non-application layer, such as system Runtime Library layer, middleware and DVM virtual machine etc., system bottom can be passed through Get the customized development of bluetooth hot spot information realization Bluetooth function.
Further, referring to Fig. 3, second embodiment of the invention provides a kind of acquisition methods of bluetooth hot spot information, is based on Above-mentioned embodiment shown in Fig. 2, before step S10 monitors Bluetooth broadcast by Bluetooth broadcast receiver, further includes:
Step S101 registers Bluetooth broadcast receiver, and the type for monitoring Bluetooth broadcast, the class of the Bluetooth broadcast is arranged Type includes bluetooth hot spot discovery broadcast and the broadcast of the bluetooth end of scan.
As without included Bluetooth broadcast receiver, then needed first to receive to one Bluetooth broadcast of endpoint to register in above-mentioned terminal Bluetooth broadcast receiver just may be implemented in this way and monitor Bluetooth broadcast for device.Since system can issue many at runtime The broadcast of type, such as device power-up broadcast, equipment shutdown broadcast, network connection state variation broadcast or time change broadcast, The broadcast type monitored Bluetooth broadcast receiver is thus needed to be configured.In the present embodiment, Bluetooth broadcast receiver is only Monitor bluetooth hot spot discovery broadcast and the broadcast of the bluetooth end of scan.Bluetooth hot spot discovery broadcast is that bluetooth is scanned to ambient enviroment System issues when other bluetooth equipments shared bluetooth hot spot, and the broadcast of the bluetooth end of scan is after bluetooth completes a wheel scan, Terminate what system when scanning issued.
Specifically, in Android (Android) system, application program registration radio receiver process just be broadcast connect Receive the process that device is registered to ActivityManagerService (AMS).Android application program is to pass through calling The registerReceiver function of ContextWrapper class is registered to radio receiver (BroadcastReceiver) It is gone in ActivityManagerService, and ContextWrapper class itself is registered by ContextImpl class Radio receiver.In Android application program frame, Activity and Service class all inherits ContextWrapper class, Therefore, we can call registerReceiver function in the subclass of Activity or Service to register broadcast Receiver.After having registered radio receiver, need for received broadcast type to be stored in ActivityManagerService, It broadcasts and is handled accordingly can to receive later.Therefore, Bluetooth broadcast receiver is being registered, and is setting up prison After the Bluetooth broadcast type listened, Bluetooth broadcast receiver can find that broadcast and the broadcast of the bluetooth end of scan are carried out to bluetooth hot spot It monitors.
Android platform sharpest edges are explorations, and any mobile terminal manufacturer, user and application developers is allowed to be added to Android alliance allows numerous manufacturers to release function application product with their own characteristics.Platform is supplied to third party developer It is wide in range, freely develop environment, thus can be born application abundant, that practicability is good, novel, unique.Those skilled in the art It is appreciated that there are also the other systems based on Android system exploitation to be also suitable bluetooth proposed by the present invention other than Android system The acquisition methods of hot spot, such as STV OS1.0 system, SmartisanOS, IUNIOS, HTCSense, MIUI system, FlymeOS Deng.It will be appreciated by those skilled in the art that being, the present invention is suitable for above system, but does not limit above system.
Step S102, receives the bluetooth open instructions of user's triggering, and starts bluetooth.
User opens the key on control or remote controler by the bluetooth on terminal display screen, opens bluetooth, can also lead to Cross the direct opened bluetooth function of other application programs at the terminal.After opening bluetooth, when peripheral region is arrived in the every scanning of bluetooth One bluetooth hot spot information then sends a bluetooth hot spot discovery broadcast to Bluetooth broadcast receiver, when one wheel scan knot of bluetooth Beam then sends a bluetooth end of scan broadcast to Bluetooth broadcast receiver.Bluetooth broadcast receiver in this way can be monitored in real time Situation and bluetooth scanning mode are scanned to bluetooth hot spot.
The present embodiment allows the terminal for not carrying Bluetooth broadcast receiver by registration Bluetooth broadcast receiver and sets Bluetooth broadcast type is set to realize that Bluetooth broadcast is monitored, to get bluetooth hot spot information.
Further, referring to Fig. 4, third embodiment of the invention provides a kind of acquisition methods of bluetooth hot spot information, is based on Above-mentioned embodiment shown in Fig. 2, it is described after listening to Bluetooth broadcast, the bluetooth hot spot information in the Bluetooth broadcast is parsed, Obtain bluetooth characteristic the step of include:
Step S201 judges whether the Bluetooth broadcast monitored is bluetooth hot spot discovery broadcast.
Since the Bluetooth broadcast that Bluetooth broadcast receiver can be monitored includes bluetooth hot spot discovery broadcast and the bluetooth end of scan Broadcast, so when listening to Bluetooth broadcast, it is necessary first to judge whether this Bluetooth broadcast is bluetooth hot spot discovery broadcast.
If the Bluetooth broadcast monitored is bluetooth hot spot discovery broadcast, S202 is thened follow the steps.
Step S202 parses the bluetooth hot spot information in the Bluetooth broadcast, obtains bluetooth characteristic.
Due to the bluetooth hot spot information carried in bluetooth hot spot discovery broadcast, terminal finds to carry in broadcast to bluetooth hot spot Bluetooth hot spot information parsed after, get bluetooth characteristic.The bluetooth characteristic is bluetooth title, signal is strong A combination of one or more in degree or bluetooth protocol version, is also possible to the combination with other types bluetooth characteristic. Preferred bluetooth title, signal strength and three kinds of bluetooth protocol version of combination in the present embodiment.
If the Bluetooth broadcast monitored is the broadcast of the bluetooth end of scan, thens follow the steps S30: the bluetooth characteristic is set It is set to bluetooth hot spot attribute.
If the Bluetooth broadcast that Bluetooth broadcast receiver is monitored is the broadcast of the bluetooth end of scan, then it represents that one wheel scan knot of bluetooth Beam, at this moment terminal needs are saved in preset memory the bluetooth characteristic that this wheel scan acquires, and by memory In bluetooth characteristic be arranged to bluetooth hot spot attribute.The bluetooth characteristic that wherein scanning of epicycle bluetooth acquires can be One, it is also possible to multiple.
This implementation further includes another embodiment, i.e., Bluetooth broadcast type only has bluetooth hot spot discovery broadcast, without indigo plant The broadcast of the tooth end of scan, when bluetooth sweep time reaching preset time, bluetooth terminates to scan, and executes step S30: by the indigo plant Tooth characteristic is arranged to bluetooth hot spot attribute.
Specifically, after Bluetooth broadcast receiver listens to Bluetooth broadcast, terminal believes the bluetooth hot spot in Bluetooth broadcast Breath is parsed, and obtains bluetooth characteristic, while terminal judges whether bluetooth sweep time reaches preset time, such as not up to Preset time, then bluetooth continues to scan on, and after scanning to bluetooth hot spot, sends Bluetooth broadcast;If reaching preset time, terminate indigo plant Tooth scanning, and bluetooth hot spot attribute is arranged to all bluetooth characteristics that epicycle acquires.
The present embodiment makes terminal after the Bluetooth broadcast listened to, according to the type in Bluetooth broadcast or passes through bluetooth Whether sweep time reaches preset time to judge whether bluetooth scanning terminates, so that terminal be made to hold according to different judging results The different step of row.If bluetooth scanning is not finished, then continue to send Bluetooth broadcast to Bluetooth broadcast receiver, and it is wide to parse bluetooth Bluetooth hot spot information in broadcasting obtains bluetooth characteristic;Such as the bluetooth end of scan, S30 is thened follow the steps: the bluetooth is special Sign data are arranged to bluetooth hot spot attribute.
Further, referring to Fig. 5, fourth embodiment of the invention provides a kind of acquisition methods of bluetooth hot spot information, is based on Above-mentioned embodiment shown in Fig. 2, the described the step of bluetooth characteristic is arranged to bluetooth hot spot attribute, comprising:
The bluetooth characteristic is integrated into corresponding character string by step S301.
Step S302, calling system attribute are arranged interface and the character string are arranged to bluetooth hot spot attribute.
When the bluetooth end of scan, all bluetooth characteristics that this wheel scan in memory obtains are integrated, are converted Interface such as SystemProperties.set () interface is set at character string forms, and by calling system attribute, to all indigo plants Bluetooth hot spot attribute is arranged in the corresponding character string of tooth characteristic.
Because the attribute value in system can be called by any layer in system, including system bottom, thus system bottom is just It is capable of calling system property and reads interface such as SystemProperties.get () interface, it is corresponding to get bluetooth hot spot attribute Bluetooth characteristic.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium On be stored with the acquisition program of bluetooth hot spot information, realized such as when the acquisition program of the bluetooth hot spot information is executed by processor Lower operation:
Bluetooth broadcast is monitored by Bluetooth broadcast receiver;
After listening to Bluetooth broadcast, the bluetooth hot spot information in the Bluetooth broadcast is parsed, obtains bluetooth characteristic;
The bluetooth characteristic is arranged to bluetooth hot spot attribute;
Bluetooth hot spot attribute is read by system bottom, executes bluetooth so that other application gets bluetooth hot spot information Relevant operation.
Further, following operation is also realized when the acquisition program of the bluetooth hot spot information is executed by processor:
Bluetooth broadcast receiver is registered, and the type for monitoring Bluetooth broadcast is set, the type of the Bluetooth broadcast includes indigo plant Tooth hot spot discovery broadcast and the broadcast of the bluetooth end of scan;
The bluetooth open instructions of user's triggering is received, and starts bluetooth.
Further, following operation is also realized when the acquisition program of the bluetooth hot spot information is executed by processor:
Judge whether the Bluetooth broadcast monitored is bluetooth hot spot discovery broadcast;
If the Bluetooth broadcast monitored is bluetooth hot spot discovery broadcast, the bluetooth hot spot letter in the Bluetooth broadcast is parsed Breath obtains bluetooth characteristic.
Further, following operation is also realized when the acquisition program of the bluetooth hot spot information is executed by processor:
If the Bluetooth broadcast monitored is the broadcast of the bluetooth end of scan, then follow the steps: the bluetooth characteristic is arranged At bluetooth hot spot attribute.
Further, following operation is also realized when the acquisition program of the bluetooth hot spot information is executed by processor:
The bluetooth characteristic is integrated into corresponding character string;
Calling system attribute is arranged interface and the character string is arranged to bluetooth hot spot attribute.
Each reality of acquisition methods of the specific embodiment of computer readable storage medium of the present invention and above-mentioned bluetooth hot spot information It is essentially identical to apply example, therefore not to repeat here.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone, Computer, TV or music player etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of acquisition methods of bluetooth hot spot information, which comprises the following steps:
Bluetooth broadcast is monitored by Bluetooth broadcast receiver;
After listening to Bluetooth broadcast, the bluetooth hot spot information in the Bluetooth broadcast is parsed, obtains bluetooth characteristic;
The bluetooth characteristic is arranged to bluetooth hot spot attribute;
Bluetooth hot spot attribute is read by system bottom, so that other application gets the correlation that bluetooth hot spot information executes bluetooth Operation.
2. the acquisition methods of bluetooth hot spot information as described in claim 1, which is characterized in that connect described by Bluetooth broadcast Receipts device is monitored before Bluetooth broadcast step, comprising:
Bluetooth broadcast receiver is registered, and the type for monitoring Bluetooth broadcast is set, the type of the Bluetooth broadcast includes bluetooth heat Point discovery broadcast and the broadcast of the bluetooth end of scan;
The bluetooth open instructions of user's triggering is received, and starts bluetooth.
3. the acquisition methods of bluetooth hot spot information as claimed in claim 2, which is characterized in that described to listen to Bluetooth broadcast Afterwards, the step of parsing the bluetooth hot spot information in the Bluetooth broadcast, obtaining bluetooth characteristic include:
Judge whether the Bluetooth broadcast monitored is bluetooth hot spot discovery broadcast;
If the Bluetooth broadcast monitored is bluetooth hot spot discovery broadcast, the bluetooth hot spot information in the Bluetooth broadcast is parsed, is obtained Take bluetooth characteristic.
4. the acquisition methods of bluetooth hot spot information as claimed in claim 3, which is characterized in that in the bluetooth that the judgement is monitored Broadcast whether be bluetooth hot spot discovery Broadcast step after, further includes:
If the Bluetooth broadcast monitored is the broadcast of the bluetooth end of scan, thens follow the steps: the bluetooth characteristic is arranged to indigo plant Tooth hot spot attribute.
5. the acquisition methods of bluetooth hot spot information as claimed in claim 4, which is characterized in that described by the bluetooth characteristic Include: according to the step of being arranged to bluetooth hot spot attribute
The bluetooth characteristic is integrated into corresponding character string;
Calling system attribute is arranged interface and the character string is arranged to bluetooth hot spot attribute.
6. the acquisition methods of the bluetooth hot spot information as described in any in claim 1 to 5, which is characterized in that the bluetooth is special Levying data includes bluetooth title, signal strength and bluetooth protocol version.
7. a kind of acquisition system of bluetooth hot spot information, which is characterized in that the acquisition system of the bluetooth hot spot information includes: to deposit Reservoir, processor and the acquisition journey for being stored in the bluetooth hot spot information that can be run on the memory and on the processor The acquisition program of sequence, the bluetooth hot spot information realizes following steps when being executed by the processor:
Bluetooth broadcast is monitored by Bluetooth broadcast receiver;
After listening to Bluetooth broadcast, the bluetooth hot spot information in the Bluetooth broadcast is parsed, obtains bluetooth characteristic;
The bluetooth characteristic is arranged to bluetooth hot spot attribute;
Bluetooth hot spot attribute is read by system bottom, so that other application gets the correlation that bluetooth hot spot information executes bluetooth Operation.
8. the acquisition system of bluetooth hot spot information as claimed in claim 7, which is characterized in that the bluetooth hot spot information obtains Program fetch also realizes following steps when being executed by the processor:
Bluetooth broadcast receiver is registered, and the type for monitoring Bluetooth broadcast is set, the type of the Bluetooth broadcast includes bluetooth heat Point discovery broadcast and the broadcast of the bluetooth end of scan;
The bluetooth open instructions of user's triggering is received, and starts bluetooth.
9. the acquisition system of bluetooth hot spot information as claimed in claim 7, which is characterized in that the bluetooth hot spot information obtains Program fetch also realizes following steps when being executed by the processor:
Judge whether the Bluetooth broadcast monitored is bluetooth hot spot discovery broadcast;
If the Bluetooth broadcast monitored is bluetooth hot spot discovery broadcast, the bluetooth hot spot information in the Bluetooth broadcast is parsed, is obtained Take bluetooth characteristic.
10. a kind of computer readable storage medium, which is characterized in that be stored thereon with the acquisition program of bluetooth hot spot information, institute It states and is realized when the acquisition program of bluetooth hot spot information is executed by processor such as bluetooth heat described in any one of claims 1 to 6 The step of acquisition methods of point information.
CN201811631748.6A 2018-12-28 2018-12-28 Acquisition methods, system and the computer readable storage medium of bluetooth hot spot information Pending CN109743692A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811631748.6A CN109743692A (en) 2018-12-28 2018-12-28 Acquisition methods, system and the computer readable storage medium of bluetooth hot spot information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811631748.6A CN109743692A (en) 2018-12-28 2018-12-28 Acquisition methods, system and the computer readable storage medium of bluetooth hot spot information

Publications (1)

Publication Number Publication Date
CN109743692A true CN109743692A (en) 2019-05-10

Family

ID=66362110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811631748.6A Pending CN109743692A (en) 2018-12-28 2018-12-28 Acquisition methods, system and the computer readable storage medium of bluetooth hot spot information

Country Status (1)

Country Link
CN (1) CN109743692A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113473434A (en) * 2021-08-17 2021-10-01 杭州涂鸦信息技术有限公司 Bluetooth connection method, device, computer equipment and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103702191A (en) * 2013-12-16 2014-04-02 Tcl集团股份有限公司 Method for avoiding ANR (Application Not Responding) occurring on smart television starter
CN103927028A (en) * 2014-04-30 2014-07-16 广州视源电子科技股份有限公司 Method for achieving side key function of electromagnetic touch pen
CN104822127A (en) * 2015-03-09 2015-08-05 中国科学院信息工程研究所 Bluetooth device, data channel real-time management and control method and system thereof
CN105183622A (en) * 2015-08-25 2015-12-23 青岛海信移动通信技术股份有限公司 Log processing method and device based on Android system
WO2016118848A1 (en) * 2015-01-22 2016-07-28 Clearstream. Tv, Inc. Video advertising system
CN108052401A (en) * 2017-12-27 2018-05-18 深圳Tcl新技术有限公司 System property monitor method, terminal device and computer readable storage medium
CN108986723A (en) * 2018-07-20 2018-12-11 深圳创维-Rgb电子有限公司 A kind of self-sensing method and equipment of visual screen display device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103702191A (en) * 2013-12-16 2014-04-02 Tcl集团股份有限公司 Method for avoiding ANR (Application Not Responding) occurring on smart television starter
CN103927028A (en) * 2014-04-30 2014-07-16 广州视源电子科技股份有限公司 Method for achieving side key function of electromagnetic touch pen
WO2016118848A1 (en) * 2015-01-22 2016-07-28 Clearstream. Tv, Inc. Video advertising system
CN104822127A (en) * 2015-03-09 2015-08-05 中国科学院信息工程研究所 Bluetooth device, data channel real-time management and control method and system thereof
CN105183622A (en) * 2015-08-25 2015-12-23 青岛海信移动通信技术股份有限公司 Log processing method and device based on Android system
CN108052401A (en) * 2017-12-27 2018-05-18 深圳Tcl新技术有限公司 System property monitor method, terminal device and computer readable storage medium
CN108986723A (en) * 2018-07-20 2018-12-11 深圳创维-Rgb电子有限公司 A kind of self-sensing method and equipment of visual screen display device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113473434A (en) * 2021-08-17 2021-10-01 杭州涂鸦信息技术有限公司 Bluetooth connection method, device, computer equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN108536594B (en) Page testing method and device and storage equipment
US10880734B2 (en) Method for pairing Bluetooth device with mobile device and apparatus thereof
WO2019227450A1 (en) Application function implementation method and electronic device
US20170316209A1 (en) Method and device for preventing application in an operating system from being uninstalled
CN109743598A (en) Third party is authorized to access method, system and the readable storage medium storing program for executing of TV
US20220365985A1 (en) Page jump method and apparatus, electronic device and computer-readable storage medium
CN108228230A (en) Upgrade method, terminal and the computer readable storage medium of UFS firmwares
CN109408150A (en) It is a kind of to apply loading method and mobile terminal fastly
CN112217671B (en) Method and equipment for performing interface display on front-end micro-service based on split deployment
CN107666406B (en) Intelligent card display method and device
US20150169600A1 (en) Interface display method and system for home gateway applicable to various display types
CN111209065B (en) Dynamic wallpaper setting method and device, storage medium and electronic equipment
CN109800030B (en) Application program running method and device and terminal
CN111557097B (en) Control method of power key in virtual remote controller and terminal
CN107038046A (en) Upgrade method, device and the terminal of audio frequency broadcast system
CN113784200A (en) Communication terminal, display device and screen projection connection method
CN107704332A (en) Freeze screen solution method, mobile terminal and computer-readable recording medium
CN107765922A (en) Card screen detection is with solving method, mobile terminal and computer-readable recording medium
CN110502263A (en) Upgrade package production method, system and computer readable storage medium
CN109743692A (en) Acquisition methods, system and the computer readable storage medium of bluetooth hot spot information
CN108182090A (en) Flash plug-in loading methods and device based on blink kernels
CN109788470A (en) Identify the method, apparatus and terminal of eSIM card
She et al. Hermes: A tool for testing mobile device applications
CN114647412A (en) Content display method and terminal equipment
CN107861827A (en) Card screen detection method, mobile terminal and computer-readable recording medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190510