CN103457642A - Method and device for obtaining information of intelligent terminal telephone book - Google Patents

Method and device for obtaining information of intelligent terminal telephone book Download PDF

Info

Publication number
CN103457642A
CN103457642A CN2013103575985A CN201310357598A CN103457642A CN 103457642 A CN103457642 A CN 103457642A CN 2013103575985 A CN2013103575985 A CN 2013103575985A CN 201310357598 A CN201310357598 A CN 201310357598A CN 103457642 A CN103457642 A CN 103457642A
Authority
CN
China
Prior art keywords
intelligent terminal
bluetooth
associated person
person information
obtaining
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
CN2013103575985A
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.)
SHANGHAI TYD ELECTRONIC TECHNOLOGY Co Ltd
Original Assignee
SHANGHAI TYD ELECTRONIC 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 SHANGHAI TYD ELECTRONIC TECHNOLOGY Co Ltd filed Critical SHANGHAI TYD ELECTRONIC TECHNOLOGY Co Ltd
Priority to CN2013103575985A priority Critical patent/CN103457642A/en
Publication of CN103457642A publication Critical patent/CN103457642A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a method and device for obtaining information of an intelligent terminal telephone book. The method comprises the steps that a first intelligent terminal and a second intelligent terminal are paired through a Bluetooth mode; the first intelligent terminal sends a Bluetooth connecting requirement to the second intelligent terminal paired in the Bluetooth mode and is in Bluetooth connection with the second intelligent terminal; the first intelligent terminal sends an OBEX connecting requirement and is in OBEX connection with the second intelligent terminal; the first intelligent terminal sends a requirement for obtaining contact information of a telephone book of the second intelligent terminal on the basis of an access protocol of the telephone book, receives the returned corresponding contact information of the second intelligent terminal, and adds the contact information to a local telephone book. According to the method and device, the Bluetooth PBAP protocol is utilized, an OBEX is utilized to achieve a customer service-side of PBAP service of an Android system, and an Android intelligent terminal can actively obtain telephone book information of other intelligent terminals through the Bluetooth mode.

Description

A kind of method and device that obtains the intelligent terminal telephone directory information
Technical field
The present invention relates to the intelligent terminal field, relate in particular to a kind of method and device that obtains the intelligent terminal telephone directory information.
Background technology
So-called bluetooth (Bluetooth) technology, be actually a kind of short-range radio technology, " bluetooth " technology of utilization, can effectively simplify the exchanges data between the mobile communication terminal devices such as palmtop PC, notebook computer, mobile unit and smart mobile phone, can also simplify communicating by letter between above equipment and internet Internet, thereby making the transfer of data between these mobile communication terminal devices and internet become efficient more rapidly, is the radio communication widening road.
Bluetooth adopts distributed network structure and fast frequency hopping and short packet technology, supports point-to-point and point-to-multipoint delivery, is operated in the i.e. industry of 2.4GHz ISM(, science, the medical science of global general-use) frequency range.Adopt the time division duplex transmission scheme to realize full duplex transmission.Can carry out easily the transmission of the multi-medium datas such as photo between various mobile communication terminal devices, audio frequency and video by the Bluetooth technology people.
Along with popularizing of smart mobile phone, and nearly all smart mobile phone all has Bluetooth function.In prior art, when the user changes smart mobile phone, perhaps when the user need to use two above smart mobile phones, again or while before different cellphone subscriber, needing in synchronous mobile phone a certain particular contact information, usually wish fast the whole or part associated person information of the phone directory in a mobile phone or a certain particular contact information to be synchronized in other mobile phones.Yet, realize between existing smart mobile phone that phone directory simultaneous operation is to carry out by internet or by PC mostly, can not realize by Bluetooth technology synchronous or a certain particular contact information synchronous of phone directory in different mobile phones.
Therefore, prior art need to improve.
Summary of the invention
The object of the present invention is to provide a kind of method and device that obtains the intelligent terminal telephone directory information, to solve existing Android intelligent terminal, can not pass through the technical problem of other intelligent terminal telephone directory information of bluetooth approach active obtaining.
For reaching this purpose, the present invention by the following technical solutions:
One aspect of the present invention provides a kind of method of obtaining the intelligent terminal telephone directory information, comprising:
The first intelligent terminal passes through bluetooth discovery the second intelligent terminal, and carries out Bluetooth pairing with the second intelligent terminal;
The first intelligent terminal sends Bluetooth connection request to the second intelligent terminal that completes Bluetooth pairing, sets up and is connected with the bluetooth of the second intelligent terminal;
The first intelligent terminal sends Object Exchange OBEX connection request to the second intelligent terminal, sets up and is connected with the OBEX of the second intelligent terminal;
The first intelligent terminal sends the request of obtaining associated person information in the second intelligent terminal phone directory to the second intelligent terminal based on this access protocal of bluetooth telephone, and receive the associated person information of the correspondence that the second intelligent terminal returns, add described associated person information to local call in this.
Wherein, described the first intelligent terminal receives the associated person information of the correspondence that the second intelligent terminal returns, by described associated person information add to local call in this after, also comprise:
The first intelligent terminal sends OBEX to the second intelligent terminal and disconnects request, disconnects and being connected with the described OBEX of the second intelligent terminal;
The first intelligent terminal cuts out bluetooth socket, disconnects and being connected with the bluetooth of the second intelligent terminal.
Wherein, described the first intelligent terminal sends Bluetooth connection request to the second intelligent terminal that completes Bluetooth pairing, sets up and is connected with the bluetooth of the second intelligent terminal, comprising:
The second intelligent terminal adopts this access protocal of bluetooth telephone to create a BluetoothServerSocket, monitors the Bluetooth connection request of the first intelligent terminal by this BluetoothServerSocket;
The first intelligent terminal sends Bluetooth connection request to the second intelligent terminal, creates a customer end B luetoothSocket;
The second intelligent terminal BluetoothServerSocket listens to the Bluetooth connection request that described the first intelligent terminal sends and accepts this Bluetooth connection request, obtains a server end BluetoothSocket;
Setting up described the first intelligent terminal based on described customer end B luetoothSocket and server end BluetoothSocket is connected with the bluetooth of the second intelligent terminal.
Wherein, described the first intelligent terminal sends the request of obtaining associated person information in the second intelligent terminal phone directory to the second intelligent terminal based on this access protocal of bluetooth telephone, and receive the associated person information of the correspondence that the second intelligent terminal returns, described associated person information is added in the local call basis, comprising:
The first intelligent terminal sends the instruction of obtaining contact person's sum in the second intelligent terminal phone directory to the second intelligent terminal based on this access protocal of bluetooth telephone, receive the phone directory contact person sum that the second intelligent terminal returns;
The first intelligent terminal sends the instruction of obtaining each associated person information in the second intelligent terminal phone directory one by one to the second intelligent terminal based on this access protocal of bluetooth telephone, and receive associated person information corresponding in the phone directory that the second intelligent terminal returns, add the associated person information received to local call in this.
Wherein, described the first intelligent terminal receives associated person information corresponding in the phone directory that the second intelligent terminal returns, and adds the associated person information received to local call in this, is specially:
The first intelligent terminal receives associated person information corresponding in the phone directory that the second intelligent terminal returns one by one, and the associated person information received is saved as to the .vcf formatted file;
The first intelligent terminal is resolved one by one described .vcf formatted file and is obtained corresponding associated person information, and the associated person information of acquisition is added in the local call basis.
Wherein, described the first intelligent terminal and the second intelligent terminal are the intelligent terminal of Android system.
The present invention also provides a kind of device that obtains the intelligent terminal telephone directory information on the other hand, comprising:
The Bluetooth pairing module, for passing through bluetooth discovery the second intelligent terminal, and carry out Bluetooth pairing with the second intelligent terminal;
The bluetooth link block, for sending Bluetooth connection request, set up and be connected with the bluetooth of the second intelligent terminal;
The OBEX link block, for sending Object Exchange OBEX connection request, set up and be connected with the OBEX of the second intelligent terminal;
Obtain phonebook module, for send the request of obtaining the second intelligent terminal phone directory associated person information based on this access protocal of bluetooth telephone, and receive the associated person information of the correspondence that the second intelligent terminal returns, add described associated person information to local call in this.
Wherein, described OBEX link block, also disconnect request for sending OBEX, disconnects and being connected with the described OBEX of the second intelligent terminal;
Described bluetooth link block, also for closing bluetooth socket, disconnect and being connected with the bluetooth of the second intelligent terminal.
Wherein, described bluetooth link block specifically for:
Send Bluetooth connection request to the second intelligent terminal; If this Bluetooth connection request is accepted by the BluetoothServerSocket of the second intelligent terminal, set up and be connected with the bluetooth of the second intelligent terminal;
Wherein, the second intelligent terminal adopts this access protocal of bluetooth telephone to create a BluetoothServerSocket, monitors the Bluetooth connection request entered by this BluetoothServerSocket.
Wherein, the described phonebook module of obtaining, specifically for:
Send the instruction of obtaining contact person's sum in the second intelligent terminal phone directory based on this access protocal of bluetooth telephone to the second intelligent terminal, receive the phone directory contact person sum that the second intelligent terminal returns according to this instruction; And,
Send one by one the instruction of obtaining each associated person information in the second intelligent terminal phone directory to the second intelligent terminal based on this access protocal of bluetooth telephone, and receive associated person information corresponding in the phone directory that the second intelligent terminal returns, the associated person information received is saved as to the .vcf formatted file; And,
Resolve described .vcf formatted file and obtain associated person information, the associated person information obtained is added in the local call basis.
Implement the embodiment of the present invention, there is following beneficial effect:
The embodiment of the present invention is based on the Android system, utilize bluetooth PBAP(Phone Book Access Profile: the phone directory access protocal) agreement, and use Object Exchange (OBEX:Object Exchange) to realize the client functionality of the PBAP service of Android system, make the Android intelligent terminal can pass through the telephone directory information of other intelligent terminals of bluetooth approach active obtaining, provide users with the convenient.
The accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, below will the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described, apparently, the accompanying drawing the following describes is only some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the schematic flow sheet of the embodiment of a kind of method of obtaining the intelligent terminal telephone directory information of the present invention.
Fig. 2 is the mutual schematic diagram of the client and server end of a kind of method of obtaining the intelligent terminal telephone directory information of the present invention.
Fig. 3 is the format specification of the request of obtaining server end phone directory associated person information that sends of the client of a kind of method of obtaining the intelligent terminal telephone directory information of the present invention.
Fig. 4 is the idiographic flow schematic diagram of the embodiment of a kind of method of obtaining the intelligent terminal telephone directory information of the present invention.
Fig. 5 is a kind of structural representation that obtains the device of intelligent terminal telephone directory information of the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing of the present invention, technical scheme in the embodiment of the present invention is carried out to clear, complete description, obviously, described embodiment is only a part of embodiment of the present invention, rather than whole embodiment.Embodiment based in the present invention, the every other embodiment that those of ordinary skills obtain under the prerequisite of not making creative work, belong to the scope of protection of the invention.
The Android system starts to support new bluetooth PBAP after 2.0, in bluetooth protocol repertory, PBAP downloads for blue tooth vehicular equipment a set of agreement that the phone directory in mobile phone defines specially automatically, it is structured on Object Exchange OBEX basis, and PBAP is based on similar Basic API interface and calls path implement.Due to based on the OBEX agreement, the realization of PBAP comprises Server server end and Client client two ends, and current Android system itself has only realized the Server end of PBAP, and the Client end is not realized.Therefore, existing Android intelligent terminal can't obtain by the bluetooth request telephone directory information of other equipment.
The embodiment of the present invention is based on the Android system, utilize the client-side program of bluetooth PBAP protocol development, to realize the PBAP client functionality in the Android intelligent terminal, can allow that the intelligent terminal with this function can pass through the associated person information of bluetooth active obtaining to method, apparatus.More because now on the market Android mobile phone version all more than 2.3, so, after the present invention realizes, there is larger application space.
In the embodiment of the present invention, intelligent terminal can comprise: PC, panel computer, mobile phone, PDA(Personal Digital Assistant, palmtop PC), electronic reader, notebook computer, intelligent television, car-mounted terminal etc. can set up the intelligent terminal of phone directory, and described intelligent terminal is based on the Android system.Preferably, if without illustrating, the intelligent terminal in the present embodiment refers to the smart mobile phone of Android system.
Below in conjunction with accompanying drawing 1-accompanying drawing 4, the method for obtaining the intelligent terminal telephone directory information that the embodiment of the present invention is provided describes in detail.
Refer to Fig. 1, Fig. 1 is the schematic flow sheet of the embodiment of a kind of method of obtaining the intelligent terminal telephone directory information of the present invention, and the method specifically comprises the steps S1-S4:
Step S1, the first intelligent terminal passes through bluetooth discovery the second intelligent terminal, and carries out Bluetooth pairing with the second intelligent terminal.
During concrete enforcement, can customize corresponding PBAP application program at the first intelligent terminal and the second intelligent terminal in advance, comprise the processing of some interface controls etc.After receiving this application program of user's operational order initialization the first intelligent terminal, also need the bluetooth that detects the first intelligent terminal and the second intelligent terminal whether all to open, if do not have, need first to open the bluetooth of the first intelligent terminal and the second intelligent terminal.
Carry out Bluetooth pairing about the first intelligent terminal and the second intelligent terminal and belong to prior art, can carry out with reference to existing Bluetooth pairing method, do not repeat them here.
Step S2, the first intelligent terminal sends Bluetooth connection request to the second intelligent terminal that completes Bluetooth pairing, sets up and is connected with the bluetooth of the second intelligent terminal.Be specially, the first intelligent terminal sends Bluetooth connection request to the second intelligent terminal that completes Bluetooth pairing, if described Bluetooth connection request is accepted by the second intelligent terminal, setting up the first intelligent terminal is connected with the bluetooth of the second intelligent terminal, otherwise the first intelligent terminal continues to send Bluetooth connection request.
The embodiment of the present invention is to utilize bluetooth PBAP agreement, develops the client client functionality of realizing PBAP on the OBEX protocol basis in the Android intelligent terminal.At first need the bluetooth of setting up two intelligent terminals to connect.Connect in order to create a bluetooth on two intelligent terminals, must on software, realize the mechanism of server end and client, between them, with the distinct methods of BluetoothSocket class, obtain data.Only have when server end and client have a BluetoothSocket, could set up a bluetooth between them and connect, can start transfer of data.
Therefore, when wanting bluetooth to connect two Android intelligent terminals, using one of them intelligent terminal as client, in the present embodiment, the first intelligent terminal is as client, by wherein the another one intelligent terminal is as server end, in the present embodiment, the second intelligent terminal is as server end.And pass through the proprietary UUID(Universally Unique Identifier of bluetooth PBAP at server end, general unique identifier) create a Bluetooth Server Socket, open this Bluetooth Server Socket and monitor the Bluetooth connection request entered.The bluetooth connection procedure of client and server end is as follows.
At first, client sends a Bluetooth connection request to the server end that completes Bluetooth pairing, in client, has created a BluetoothSocket.
Concrete, for bluetooth to server end of initialization connects, at first client must obtain a BluetoothSocket connection of initialization, and basic process is as follows:
The client bluetooth equipment calls createRfcommSocketToServiceRecord (UUID) to obtain the BluetoothSocket of a client.The UUID coupling that the parameter UUID herein imported into is used in the time of must opening BluetoothServerSocket with server end.
Then, client call connect () method is with Bluetooth connection request of initialization.By call connect () method system will carry out SDP search remote Bluetooth devices with the coupling UUID.When the Bluetooth connection request only sent when the client bluetooth equipment comprises the UUID coupling that UUID and the BluetoothServerSocket that monitoring register Bluetooth connection request just possible serviced device termination be subject to.
If search successfully and the bluetooth equipment of server end has been accepted this connection, connect () will return to a BluetoothSocket, and client obtains a BluetoothSocket.Connect () method is that an obstruction calls.The connection failure of any reason or overtime (greatly about 12 seconds) all will be dished out one extremely.
Further, server end listens to the Bluetooth connection request sent from client, if accept, the current bluetooth of response message notice client of to client, returning to a correspondence connects and is accepted.When Bluetooth connection request that server end is accepted to send from client, at server end, will produce a BluetoothSocket.So far, the client and server end all has a BluetoothSocket, is defaulted as the bluetooth successful connection of client and server end, and the client and server end just can connect and carry out transfer of data by this bluetooth.
Concrete, as the second intelligent terminal of server end by BluetoothServerSocket and accept the elementary process that a bluetooth connects and be:
At first, call listenUsingRfcommWithServiceRecord (String, UUID) and obtain a BluetoothServerSocket.Wherein, string argument UUID is the identification name of the bluetooth equipment of server end, and system will be write this identification name a new Service Discovery Protocol (SDP: bluetooth device discovery protocol) in data base entries on equipment automatically.UUID also can be comprised in this new SDP entry, and as with the bluetooth equipment of client, setting up the basis that bluetooth is connected.
Next, server end calls accept () method and starts to monitor the Bluetooth connection request from client.When server end has been accepted the Bluetooth connection request of a client, accept () method will be returned to the BluetoothSocket of a server end, and server end obtains a BluetoothSocket.So far, can set up described the first intelligent terminal based on described customer end B luetoothsocket and server end BluetoothSocket and be connected with the bluetooth of the second intelligent terminal, the bluetooth successful connection of client and server end.
Because being an obstruction, accept () method calls, therefore should not be in main Activity UI thread and carry out, is all to carry out in a new thread while generally using Bluetooth Server Socket or BluetoothSocket to carry out related work.Call for fear of calling the obstruction such such as accept (), call close () for the Bluetooth Server Socket from other threads or BluetoothSocket and will make to block to call immediately to return.
After the bluetooth successful connection of client and server end, server end usually calls close () method and closes BluetoothServerSocket, the all resources that take to discharge BluetoothServerSocket and it, but do not close the BluetoothSocket connected that accept () returns.Be to call immediately the BluetoothServerSocket that close () carrys out the closing server end after server end has created the socket that a bluetooth connects, stop monitoring the Bluetooth connection request of the first intelligent terminal.
It should be noted that: it is bluetooth socket connection that the described bluetooth of the present embodiment connects actual.Because connection is the Broken method, therefore need to put into Thread and process, wait for the bluetooth successful connection, if successfully connect illustrate that the PBAP that the first intelligent terminal has been set up bluetooth with the second intelligent terminal is connected.
It should be noted that, if described the first intelligent terminal and the second intelligent terminal do not carry out Bluetooth pairing before being connected setting up bluetooth, in the process of setting up the bluetooth connection, the Android system will provide information or a dialog box of a Bluetooth pairing request automatically so.Only have after the user confirms Bluetooth pairing, the RFCOMM connection between equipment just can be proceeded, otherwise the bluetooth connection failure.
Step S3, the first intelligent terminal sends Object Exchange OBEX connection request to the second intelligent terminal, sets up and is connected with the OBEX of the second intelligent terminal.Be specially: the first intelligent terminal sends Object Exchange OBEX connection request to the second intelligent terminal, if receive, the second intelligent terminal returns corresponding with described OBEX connection request replys instruction, set up the first intelligent terminal and be connected with the OBEX of the second intelligent terminal, start the PBAP service of the first intelligent terminal and the second intelligent terminal.
Refer to Fig. 2, this step specific implementation process is:
Step 21, client 100 sends the OBEX connection request to service end, and command code is 0X80, and brings parameter TAGET UUID into, and the UUID coupling of value and the second intelligent terminal, wait for that service 200 is responded.
Step 22, server end 200 is received described OBEX connection request, if accept the OBEX connection request of client 100, returns to response instruction, and command code is 0X A0, and notice client 100OBEX connection request is accepted.
So far, i.e. the OBEX successful connection of client 100 and server end 200.Client 100 records the sign CONNECT ID that distributes to current connection in the server end return data, then carries out next step.Any server acknowledge code except 0XA0 is mistake, carries out final step and quits a program.
Step S4, the first intelligent terminal sends the request of obtaining associated person information in the second intelligent terminal phone directory to the second intelligent terminal based on PBAP, and receive the associated person information corresponding with described PBAP request instruction that the second intelligent terminal returns, described associated person information is added in the local call basis.
PBAP is to adopt the GET order just can realize to phone directory simultaneous operation on OBEX.The adaptation of PBAP on OBEX is very simple, at first it is encapsulated as MIME(Multipurpose Internet Mail Extensions to the phone directory file, the expansion of multipurpose internet mail) file that type is " x-bt/phonebook ", and filename also fixed, such as the phone directory file of SIM card is SIM1/telecom/pb.vcf.After the client of PBAP (the first intelligent terminal) and server end (the second intelligent terminal) connect like this, client is initiated the GET order, and this document of request the type just can obtain the telephone directory information of server end.
PBAP adopts the form of file that phone number entry of the same type is fitted together, defined five kinds of file types: local phone phone directory, sim card number book, dialed call, missed call, received call, these files have specific filename.The file format standard of encapsulation standard based on the VCARD(electronic business card of concrete telephone item, can be used as the DIF between various application or system).
Refer to Fig. 2, in the present embodiment, client 100 first intelligent terminals are served and are sent the request instruction that obtains associated person information in server end 200 second intelligent terminal phone directories by PBAP, and receive the associated person information of the correspondence that the second intelligent terminal returns, add described associated person information to local call and specifically comprise the steps: in this
Step 23, the request instruction that obtains phone directory contact person sum that client 100 sends based on PBAP, in the present embodiment, command code is 0X83.Specifically according to the form shown in Fig. 3, constructed each field of request instruction and sent.Wherein the MLC field must be set to 0, and meaning needs server end 200 to return to phone directory contact person sum.
Step 24, after service end 200 is received the request of include instruction code 0X83 of client 100, the inquiry local call originally obtains contact person's sum N, return carried contact person's sum N information response instruction code 0XA0 to client 100.
Step 25, if client 100 is received the 0XA0 instruction of service end 200 responses, record server end 200 phone directory contact person sum N, and execution is rapid step by step, otherwise quits a program.
Step 26, client 100 sends the instruction of obtaining single contact person in server end 200 phone directories, single associated person information in acquisition request server end 200 phone directories.Described instruction is constructed each field of instruction and is sent according to the form of Fig. 3 in detail, and wherein the MLC field is set to 1, LOS field field and is incremented to N-1 from 0 successively, and the name that the NAME field arranges server end phone directory file is telecom/pb/0.vcf.
Step 27, server end 200 returns to corresponding single associated person information to client 100.In the present embodiment, the form of the associated person information that server end returns is the .vcf form.
Step 28, call Android system vcard import api and resolve described .vcf formatted file and obtain corresponding associated person information after client 100, the associated person information of acquisition is inserted into to local call in this.
N execution step 26-step 28 of circulation, client 100 is obtained each associated person information in server end 200 phone directories one by one, and each associated person information is added in client 100 phone directories.
For example, first contact person in client 100 acquisition request server end 200 phone directories, to be set to 1, LOS field field be that the name that 0, NAME field arranges server end phone directory file is telecom/pb/0.vcf to the MLC field in corresponding request instruction.Corresponding, server end 200 returns to first associated person information vcard_0 in phone directory, and client 100 is resolved vcard_0 corresponding associated person information is inserted in the local call basis.N contact person in client 100 acquisition request server end 200 phone directories, to be set to 1, LOS field field be N-1 to the MLC field in corresponding request instruction, the name that the NAME field arranges server end phone directory file is telecom/pb/0.vcf.Corresponding, server end 200 returns to N associated person information vcard_N in phone directory, and client 100 is resolved vcard_N corresponding associated person information is inserted in the local call basis.
Client 100 sends OBEX and disconnects request after getting in server end 200 phone directories all associated person informations, and instruction is replied in the disconnection that server end 200 returns if receive, and disconnects client 100 and is connected with the OBEX of server end 200.In the present embodiment, the command code that client 100 transmission OBEX disconnect request is 0X81, and the command code that instruction is replied in the disconnection that server end 200 returns is 0XA0.
It should be noted that, in the above embodiment of the present invention, the custom end intelligent terminal has been obtained the whole associated person informations in the phone directory of server end intelligent terminal by the bluetooth active request, principle based on similar, the custom end intelligent terminal can also have been obtained by the bluetooth active request associated person information of the part in the phone directory of server end intelligent terminal, the perhaps information of some particular contact, the principle of its realization and process can, with reference to the above embodiment of the present invention, not repeat them here.
The method of obtaining the intelligent terminal telephone directory information by above-described embodiment, based on the Android system, utilize bluetooth PBAP agreement, and use Object Exchange OBEX to realize the customer side function of the PBAP service of Android system, make the Android intelligent terminal can pass through the telephone directory information of other intelligent terminals of bluetooth approach active obtaining, provide users with the convenient.
For more detailed explanation a kind of method of obtaining the intelligent terminal telephone directory information of the present invention, the present invention also provides a kind of particular flow sheet that obtains the method for intelligent terminal telephone directory information, refers to Fig. 4, comprises the steps 30-step 39.
At first, open the PBAP application program of the first intelligent terminal and the second intelligent terminal, wherein, the first intelligent terminal and the second intelligent terminal have completed Bluetooth pairing.
Whether step S30, detect the bluetooth of the first intelligent terminal and open, if carry out next step, otherwise the prompting user opens bluetooth, re-executes this step.
Step 31, whether near bluetooth equipment search, search the bluetooth equipment of the second intelligent terminal, if carry out next step, otherwise proceeds to wrong treatment step.
Step 32, the first intelligent terminal sends Bluetooth connection request to the second intelligent terminal, if this Bluetooth connection request is carried out next step by the second intelligent terminal acceptance, otherwise proceeds to wrong treatment step.
Step 33, the first intelligent terminal sends the OBEX connection request to the second intelligent terminal, if this OBEX connection request is carried out next step by the second intelligent terminal acceptance, otherwise proceeds to wrong treatment step.
Step 34, the first intelligent terminal send obtain phone directory contact person sum instruction to the second intelligent terminal, the phone directory contact person sum that the second intelligent terminal returns if receive is carried out next step, otherwise proceeds to wrong treatment step.
Step 35, the first intelligent terminal send obtain the single contact person of phone directory instruction to the second intelligent terminal, in the phone directory that the second intelligent terminal returns if receive, corresponding associated person information is carried out next step, otherwise proceeds to wrong treatment step.
Step 36, the first intelligent terminal saves as the .vcf formatted file by the associated person information of acquisition.
The instruction that the single contact person of phone directory is obtained in the first intelligent terminal circulation transmission is to the second intelligent terminal, to obtain one by one the associated person information in the second intelligent terminal phone directory.
Step 37, the first intelligent terminal is resolved described .vcf formatted file and is obtained associated person information, and the associated person information obtained is added in the local call basis.
Step 38, the first intelligent terminal sends OBEX and disconnects request to the second intelligent terminal, instruction is replied in the disconnection that the second intelligent terminal returns if receive, and disconnects the first intelligent terminal and is connected with the OBEX of the second intelligent terminal.
Step 39, the first intelligent terminal cuts out bluetooth socket, disconnects the first intelligent terminal and is connected with the bluetooth of the second intelligent terminal.
Finally, the first intelligent terminal completes the solicit operation to the second intelligent terminal phone directory, exits respectively the PBAP application program of the first intelligent terminal and the second intelligent terminal according to user's operational order.
The method of obtaining the intelligent terminal telephone directory information by the present embodiment, based on the Android system, utilize bluetooth PBAP agreement, and use Object Exchange OBEX to realize the customer side function of the PBAP service of Android system, make the Android intelligent terminal can pass through the telephone directory information of other intelligent terminals of bluetooth approach active obtaining, provide users with the convenient.
Below the embodiment of the device that obtains the intelligent terminal telephone directory information that provides for the embodiment of the present invention.Embodiment and the above-mentioned embodiment of the method for device belong to same design, and the detail content of detailed description not in the embodiment installed, can be with reference to the above-mentioned embodiment of the method for readding.
Below in conjunction with accompanying drawing 5, the device that obtains the intelligent terminal telephone directory information that the embodiment of the present invention is provided describes in detail.
Refer to Fig. 5, the device that obtains the intelligent terminal telephone directory information of the present embodiment comprises:
Bluetooth pairing module 510, for passing through bluetooth discovery the second intelligent terminal, and carry out Bluetooth pairing with the second intelligent terminal.Specifically as described in Fig. 1 and embodiment.
Bluetooth link block 520, for to the the second intelligent terminal matched, sending Bluetooth connection request, set up and be connected with the bluetooth of the second intelligent terminal.Wherein, the server end that described the second intelligent terminal connects as bluetooth.Specifically as described in above-mentioned embodiment.
OBEX link block 530, for to the second intelligent terminal, sending the OBEX connection request, set up and be connected with the OBEX of the second intelligent terminal.Specifically as described in above-mentioned embodiment.
Obtain phonebook module 540, for send the request of obtaining the second intelligent terminal phone directory associated person information to the second intelligent terminal based on this access protocal of bluetooth telephone, and receive the associated person information of the correspondence that the second intelligent terminal returns, add described associated person information to local call in this.
Preferably, described OBEX link block 530, also disconnect request for to the second intelligent terminal, sending OBEX, disconnects and being connected with the described OBEX of the second intelligent terminal.Specifically, as described in above-mentioned embodiment, repeat no more.
Preferably, described bluetooth link block 520, also for closing bluetooth socket, disconnect and being connected with the bluetooth of the second intelligent terminal.Specifically, as described in above-mentioned embodiment, repeat no more.
Further, described bluetooth link block 520 can specifically for: send Bluetooth connection request to the second intelligent terminal; If this Bluetooth connection request is listened to and accepts by the second intelligent terminal BluetoothServerSocket, set up and be connected with the bluetooth of the second intelligent terminal; Wherein, the second intelligent terminal adopts BluetoothServerSocket of bluetooth telephone this access protocal specification creation, monitors the Bluetooth connection request entered by this BluetoothServerSocket.Specifically, as described in above-mentioned embodiment, repeat no more.
Further, described obtain phonebook module 540 can specifically for: send the instruction obtain contact person's sum in the second intelligent terminal phone directory based on the phone directory access protocal to the second intelligent terminal, receive contact person's sum that the second intelligent terminal returns according to this instruction; And, send one by one the instruction of obtaining each associated person information in the second intelligent terminal phone directory to the second intelligent terminal based on the phone directory access protocal, and receive the corresponding relationship people that the second intelligent terminal returns, the associated person information received is saved as to the .vcf formatted file; And, resolve described .vcf formatted file and obtain associated person information, the associated person information obtained is added in the local call basis.Specifically, as described in above-mentioned embodiment, repeat no more.
By implementing the above embodiment of the present invention, based on the Android system, utilize bluetooth PBAP agreement and use Object Exchange OBEX, realized the customer side function of the PBAP service of Android system, make the Android intelligent terminal can pass through the telephone directory information of other intelligent terminals of bluetooth approach active obtaining, provide users with the convenient.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, be can be relevant by computer program instructions hardware complete, described program can be stored in a computer-readable access media, when this program is carried out, can comprise the flow process of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (random access memory, RAM) etc.
Above disclosed is only preferred embodiment of the present invention, certainly can not limit with this claim scope of the present invention, therefore, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., still belong to the scope that the present invention is contained.

Claims (10)

1. a method of obtaining the intelligent terminal telephone directory information, is characterized in that, comprising:
The first intelligent terminal passes through bluetooth discovery the second intelligent terminal, and carries out Bluetooth pairing with the second intelligent terminal;
The first intelligent terminal sends Bluetooth connection request to the second intelligent terminal that completes Bluetooth pairing, sets up and is connected with the bluetooth of the second intelligent terminal;
The first intelligent terminal sends Object Exchange OBEX connection request to the second intelligent terminal, sets up and is connected with the OBEX of the second intelligent terminal;
The first intelligent terminal sends the request of obtaining associated person information in the second intelligent terminal phone directory to the second intelligent terminal based on this access protocal of bluetooth telephone, and receive the associated person information of the correspondence that the second intelligent terminal returns, add described associated person information to local call in this.
2. the method for obtaining the intelligent terminal telephone directory information according to claim 1, it is characterized in that, described the first intelligent terminal receives the associated person information of the correspondence that the second intelligent terminal returns, by described associated person information add to local call in this after, also comprise:
The first intelligent terminal sends OBEX to the second intelligent terminal and disconnects request, disconnects and being connected with the described OBEX of the second intelligent terminal;
The first intelligent terminal cuts out bluetooth socket, disconnects and being connected with the bluetooth of the second intelligent terminal.
3. the method for obtaining the intelligent terminal telephone directory information according to claim 1, is characterized in that, described the first intelligent terminal sends Bluetooth connection request to the second intelligent terminal that completes Bluetooth pairing, sets up and is connected with the bluetooth of the second intelligent terminal, comprising:
The second intelligent terminal adopts this access protocal of bluetooth telephone to create a BluetoothServerSocket, monitors the Bluetooth connection request of the first intelligent terminal by this BluetoothServerSocket;
The first intelligent terminal sends Bluetooth connection request to the second intelligent terminal, creates a customer end B luetoothSocket;
The second intelligent terminal BluetoothServerSocket listens to the Bluetooth connection request that described the first intelligent terminal sends and accepts this Bluetooth connection request, obtains a server end BluetoothSocket;
Setting up described the first intelligent terminal based on described customer end B luetoothSocket and server end BluetoothSocket is connected with the bluetooth of the second intelligent terminal.
4. the method for obtaining the intelligent terminal telephone directory information according to claim 1, it is characterized in that, described the first intelligent terminal sends the request of obtaining associated person information in the second intelligent terminal phone directory to the second intelligent terminal based on this access protocal of bluetooth telephone, and receive the associated person information of the correspondence that the second intelligent terminal returns, described associated person information is added in the local call basis, comprising:
The first intelligent terminal sends the instruction of obtaining contact person's sum in the second intelligent terminal phone directory to the second intelligent terminal based on this access protocal of bluetooth telephone, receive the phone directory contact person sum that the second intelligent terminal returns;
The first intelligent terminal sends the instruction of obtaining each associated person information in the second intelligent terminal phone directory one by one to the second intelligent terminal based on this access protocal of bluetooth telephone, and receive associated person information corresponding in the phone directory that the second intelligent terminal returns, add the associated person information received to local call in this.
5. the method for obtaining the intelligent terminal telephone directory information according to claim 4, it is characterized in that, described the first intelligent terminal receives associated person information corresponding in the phone directory that the second intelligent terminal returns, and adds the associated person information received to local call in this, is specially:
The first intelligent terminal receives associated person information corresponding in the phone directory that the second intelligent terminal returns one by one, and the associated person information received is saved as to the .vcf formatted file;
The first intelligent terminal is resolved one by one described .vcf formatted file and is obtained corresponding associated person information, and the associated person information of acquisition is added in the local call basis.
6. the method for obtaining the intelligent terminal telephone directory information according to claim 1, is characterized in that, described the first intelligent terminal and the second intelligent terminal are the intelligent terminal of Android system.
7. a device that obtains the intelligent terminal telephone directory information, is characterized in that, comprising:
The Bluetooth pairing module, for passing through bluetooth discovery the second intelligent terminal, and carry out Bluetooth pairing with the second intelligent terminal;
The bluetooth link block, send Bluetooth connection request for the second intelligent terminal to having matched, and sets up and be connected with the bluetooth of the second intelligent terminal;
The OBEX link block, for send Object Exchange OBEX connection request to the second intelligent terminal, set up and be connected with the OBEX of the second intelligent terminal;
Obtain phonebook module, for send the request of obtaining the second intelligent terminal phone directory associated person information to the second intelligent terminal based on this access protocal of bluetooth telephone, and receive the associated person information of the correspondence that the second intelligent terminal returns, add described associated person information to local call in this.
8. device according to claim 7, is characterized in that,
Described OBEX link block, also disconnect request for sending OBEX, disconnects and being connected with the described OBEX of the second intelligent terminal;
Described bluetooth link block, also for closing bluetooth socket, disconnect and being connected with the bluetooth of the second intelligent terminal.
9. device according to claim 7, is characterized in that, described bluetooth link block specifically for:
Send Bluetooth connection request to the second intelligent terminal matched; If this Bluetooth connection request is accepted by the BluetoothServerSocket of the second intelligent terminal, set up and be connected with the bluetooth of the second intelligent terminal;
Wherein, the second intelligent terminal adopts this access protocal of bluetooth telephone to create a BluetoothServerSocket, monitors the Bluetooth connection request entered by this BluetoothServerSocket.
10. device according to claim 8, is characterized in that, wherein, and the described phonebook module of obtaining, specifically for:
Send the instruction of obtaining contact person's sum in the second intelligent terminal phone directory based on this access protocal of bluetooth telephone to the second intelligent terminal, receive the phone directory contact person sum that the second intelligent terminal returns according to this instruction; And,
Send one by one the instruction of obtaining each associated person information in the second intelligent terminal phone directory to the second intelligent terminal based on this access protocal of bluetooth telephone, and receive associated person information corresponding in the phone directory that the second intelligent terminal returns, the associated person information received is saved as to the .vcf formatted file; And,
Resolve described .vcf formatted file and obtain associated person information, the associated person information obtained is added in the local call basis.
CN2013103575985A 2013-08-15 2013-08-15 Method and device for obtaining information of intelligent terminal telephone book Pending CN103457642A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013103575985A CN103457642A (en) 2013-08-15 2013-08-15 Method and device for obtaining information of intelligent terminal telephone book

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013103575985A CN103457642A (en) 2013-08-15 2013-08-15 Method and device for obtaining information of intelligent terminal telephone book

Publications (1)

Publication Number Publication Date
CN103457642A true CN103457642A (en) 2013-12-18

Family

ID=49739663

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013103575985A Pending CN103457642A (en) 2013-08-15 2013-08-15 Method and device for obtaining information of intelligent terminal telephone book

Country Status (1)

Country Link
CN (1) CN103457642A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103973860A (en) * 2014-05-08 2014-08-06 福建星网锐捷通讯股份有限公司 Address book synchronization method and system based on multimedia terminal and smart phone
CN104394257A (en) * 2014-11-25 2015-03-04 深圳如果技术有限公司 Method and device for intelligently using mobile address book
CN105188023A (en) * 2015-10-15 2015-12-23 飞天诚信科技股份有限公司 Bluetooth communication method and communication device
CN106790908A (en) * 2016-11-30 2017-05-31 惠州华阳通用电子有限公司 A kind of inter-vehicle information system presets the implementation method of dialing
CN106850925A (en) * 2017-01-24 2017-06-13 南京中科创达软件科技有限公司 The synchronous method of a kind of mobile unit and cellphone directory based on WiFi
CN106878522A (en) * 2015-12-10 2017-06-20 北京奇虎科技有限公司 Contact person's adding method, contact person's adding set and terminal
CN107147793A (en) * 2017-05-23 2017-09-08 努比亚技术有限公司 A kind of method called, terminal and computer-readable recording medium
CN107872518A (en) * 2017-10-25 2018-04-03 积成电子股份有限公司 Power information acquisition terminal maintaining method based on remote wireless communication module
CN108391259A (en) * 2018-01-11 2018-08-10 佳禾智能科技股份有限公司 A kind of method that bluetooth is quickly matched
CN108616638A (en) * 2016-12-07 2018-10-02 中兴通讯股份有限公司 A kind of control method and mobile terminal of bluetooth equipment
CN109348062A (en) * 2018-11-15 2019-02-15 Oppo广东移动通信有限公司 Emergency call realization method, electronic device and computer readable storage medium
CN112118344A (en) * 2020-09-25 2020-12-22 斑马网络技术有限公司 Double-telephone-book transmission method and device, electronic equipment and storage medium
CN112738738A (en) * 2020-12-30 2021-04-30 南方科技大学 Friend adding method, device, equipment and storage medium
CN113301113A (en) * 2021-04-12 2021-08-24 荣耀终端有限公司 Profile version determination method, system, electronic device and computer storage medium
CN114422639A (en) * 2022-03-16 2022-04-29 荣耀终端有限公司 Information display method and wearable device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1678104A (en) * 2004-04-01 2005-10-05 乐金电子(中国)研究开发中心有限公司 Object exchanging connection method of mobile communication terminal
CN101075828A (en) * 2007-07-20 2007-11-21 中兴通讯股份有限公司 Method for establishing connection between terminal and audio-frequency apparatus
CN101141150A (en) * 2006-09-04 2008-03-12 中兴通讯股份有限公司 Bluetooth telephone terminal device and communication method thereof
US20090253466A1 (en) * 2008-04-04 2009-10-08 Denso Corporation In-vehicle handsfree apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1678104A (en) * 2004-04-01 2005-10-05 乐金电子(中国)研究开发中心有限公司 Object exchanging connection method of mobile communication terminal
CN101141150A (en) * 2006-09-04 2008-03-12 中兴通讯股份有限公司 Bluetooth telephone terminal device and communication method thereof
CN101075828A (en) * 2007-07-20 2007-11-21 中兴通讯股份有限公司 Method for establishing connection between terminal and audio-frequency apparatus
US20090253466A1 (en) * 2008-04-04 2009-10-08 Denso Corporation In-vehicle handsfree apparatus

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
彭军: "蓝牙电话簿访问协议的研究与实现", 《中国优秀硕士学位论文》 *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103973860A (en) * 2014-05-08 2014-08-06 福建星网锐捷通讯股份有限公司 Address book synchronization method and system based on multimedia terminal and smart phone
CN104394257A (en) * 2014-11-25 2015-03-04 深圳如果技术有限公司 Method and device for intelligently using mobile address book
CN105188023A (en) * 2015-10-15 2015-12-23 飞天诚信科技股份有限公司 Bluetooth communication method and communication device
US10334410B2 (en) 2015-10-15 2019-06-25 Feitian Technologies Co., Ltd. Bluetooth communication method and communication device
CN106878522A (en) * 2015-12-10 2017-06-20 北京奇虎科技有限公司 Contact person's adding method, contact person's adding set and terminal
CN106790908B (en) * 2016-11-30 2020-10-09 惠州华阳通用电子有限公司 Method for realizing preset dialing of vehicle-mounted information system
CN106790908A (en) * 2016-11-30 2017-05-31 惠州华阳通用电子有限公司 A kind of inter-vehicle information system presets the implementation method of dialing
CN108616638A (en) * 2016-12-07 2018-10-02 中兴通讯股份有限公司 A kind of control method and mobile terminal of bluetooth equipment
CN106850925A (en) * 2017-01-24 2017-06-13 南京中科创达软件科技有限公司 The synchronous method of a kind of mobile unit and cellphone directory based on WiFi
CN107147793A (en) * 2017-05-23 2017-09-08 努比亚技术有限公司 A kind of method called, terminal and computer-readable recording medium
CN107872518A (en) * 2017-10-25 2018-04-03 积成电子股份有限公司 Power information acquisition terminal maintaining method based on remote wireless communication module
CN108391259A (en) * 2018-01-11 2018-08-10 佳禾智能科技股份有限公司 A kind of method that bluetooth is quickly matched
CN109348062A (en) * 2018-11-15 2019-02-15 Oppo广东移动通信有限公司 Emergency call realization method, electronic device and computer readable storage medium
CN112118344A (en) * 2020-09-25 2020-12-22 斑马网络技术有限公司 Double-telephone-book transmission method and device, electronic equipment and storage medium
CN112118344B (en) * 2020-09-25 2022-05-03 斑马网络技术有限公司 Double-telephone-book transmission method and device, electronic equipment and storage medium
CN112738738A (en) * 2020-12-30 2021-04-30 南方科技大学 Friend adding method, device, equipment and storage medium
CN113301113A (en) * 2021-04-12 2021-08-24 荣耀终端有限公司 Profile version determination method, system, electronic device and computer storage medium
CN113301113B (en) * 2021-04-12 2022-06-10 荣耀终端有限公司 Profile version determination method, system, electronic equipment and computer storage medium
CN114422639A (en) * 2022-03-16 2022-04-29 荣耀终端有限公司 Information display method and wearable device
CN114422639B (en) * 2022-03-16 2022-09-06 荣耀终端有限公司 Information display method and wearable device

Similar Documents

Publication Publication Date Title
CN103457642A (en) Method and device for obtaining information of intelligent terminal telephone book
CN101635766A (en) Vehicle bluetooth communication terminal device and implementation method thereof
CN108616869B (en) Multi-card multi-standby system, method, device, communication device and computer readable storage medium
US8503998B2 (en) Wireless communication terminal and wireless communication method
CN101785287A (en) System and method for providing caller ID name display in a wireless communications system
CN103108326A (en) Session relationship establishing method and device and system
CN109005532A (en) A kind of Bluetooth connecting method, bluetooth master and Bluetooth slave devices
CN103369160A (en) Implementation method and system for communication by using intelligent roaming terminal
CN101729557A (en) Method and system for realizing resource sharing of terminal equipment
CN106304030B (en) Communication method, device and system based on virtual identity information
KR101478207B1 (en) Method and apparatus for indentifing equipments requesting javapush
CN103037371A (en) Method and system of mobile terminal communication management
CN103369161A (en) Implementation method and system for communication by using intelligent roaming terminal
CN106341506A (en) Dialing method for dialing equipment, dialing device, dialing equipment and communication system
CN104703291A (en) MiFi-based communication method and relevant MiFi
CN101415268B (en) Method for automatically identifying double numbers of double-mode mobile terminal
CN102598735B (en) Set up the method for utility cession, equipment and corresponding notice
CN101384046A (en) Data calling method and system in mobile terminal system
CN106850925A (en) The synchronous method of a kind of mobile unit and cellphone directory based on WiFi
CN102685300B (en) Vehicular mobile communication equipment and method for realizing number searching
CN102905261A (en) Contact information authentication requesting and receiving method and clients
CN103457639A (en) Data transmitting method, data transmitting device, data synchronizing method and data synchronizing device
CN111615102A (en) Method and system for realizing one number double terminals
CN201438716U (en) Vehicle Bluetooth communication terminal device
CN107835284B (en) Voice call method and device of gateway equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 200233 Guiping Road, Xuhui District, No. 391, building 20, floor 3,

Applicant after: Shanghai Zhuo Yi Science and Technology Co., Ltd.

Address before: 200233 Shanghai City, Xuhui District Guiping road B new Caohejing International Business Center No. 391 20 floor

Applicant before: Shanghai TYD Electronic Technology Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: SHANGHAI TYD ELECTRONIC TECHNOLOGY CO., LTD. TO: SHANGHAI ZHUOYI TECHNOLOGY CO., LTD.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20131218