A kind of AVRCP instruction distributing method based on device type and system
Technical field
The present invention relates to technical field of mobile terminals, more particularly, to a kind of AVRCP instruction distribution side based on device type
Method and system.
Background technology
AVRCP agreement(audio video remote control profile)Bluetooth audio frequency/Video Remote controls association
View, according to bluetooth core protocol specification, this agreement is used to control audio frequency and video.With the development of intelligent mobile terminal,
On our intelligent mobile terminals, the audio frequency being related to, video are very many(As music player, video player, radio reception
Machine, recorder etc.), then when remote audio video control command is transferred on mobile terminal remote equipment, we should be by
That application is distributed in this order?The mode of operation of current mobile terminal, this remote control command is distributed to be made recently
Application with audio service;For example, nearest usage record is radio, then play voice command when remote Bluetooth devices send
When, this order can be assigned to radio, and radio can commence play out.
Current mobile terminal AVRCP control command distribution principle, meets Bluetooth protocol core specification, using bluetooth ear
Machine sowing puts the music on, watch mobile terminal video and listen to wireless during, we can also control audio frequency, video playback shape
State and wireless state, also can meet the requirement of user.But if we use long-distance vehicular bluetooth equipment when
Wait, the impression of user is just bad.Our mobile unit is substantially visual interface now, and vehicle-mounted music is play
It is also by AVRCP agreement that device controls mobile terminal;When the music of user's remote control mobile terminal, mobile terminal comes
Remain the control instruction receiving only an AVRCP agreement, this instruction may be assigned to radio, recording;If AVRCP
Play instruction is allocated to unmusical player application, and user has to manually boot on mobile terminals music player should
With so music player being synchronized on mobile unit, be that user controls mobile phone to bring inconvenience by blue tooth vehicular.
Therefore, prior art has yet to be improved and developed.
Content of the invention
In view of the deficiencies in the prior art, present invention aim at provide a kind of instruction distribution of the AVRCP based on device type
Method and system it is intended to solve prior art in user's remote control mobile terminal music when, if AVRCP play refer to
Order is allocated to unmusical player application, and user has to manually boot music player application on mobile terminals, this
Music player could be synchronized on mobile unit for sample, be that user controls mobile phone to bring the technology of inconvenience by blue tooth vehicular
Problem.
Technical scheme is as follows:
A kind of AVRCP instruction distributing method based on device type, wherein, method includes:
A, when mobile terminal receive AVRCP instruction when, obtain send AVRCP instruction equipment type, judge send AVRCP
Whether the device type of instruction is mobile unit;
B, when detect send AVRCP instruction device type be mobile unit when, mobile terminal by AVRCP instruction distribution extremely finger
Fixed application;
C, when detect send AVRCP instruction device type be not mobile unit when, mobile terminal instructs according to default AVRCP
Distribution principle distribution AVRCP instruction.
The described AVRCP instruction distributing method based on device type, wherein, also includes before described A:
The default AVRCP instruction distribution principle of S, in advance setting AVRCP instruction distributing method in the terminal.
The described AVRCP instruction distributing method based on device type, wherein, described A specifically includes:
A1, when mobile terminal receive AVRCP instruction when, obtain AVRCP instruction in device attribute, whether judge device attribute
For bluetooth equipment;
If device attribute is bluetooth equipment in A2 AVRCP instruction, judge whether the equipment sending AVRCP instruction supports PBAP
Agreement;If supporting PBAP agreement, the device type sending AVRCP instruction is mobile unit;If not supporting PBAP agreement, send out
The device type sending AVRCP instruction is not mobile unit.
The described AVRCP instruction distributing method based on device type, wherein, also includes after described B:
B1, specified application obtain AVRCP and instruct and parse, the content after execution parsing.
The described AVRCP instruction distributing method based on device type, wherein, in described S, default AVRCP instruction distribution is former
Then it is specially the usage record obtaining the service of mobile terminal sound intermediate frequency, distance in usage record is distributed in AVRCP instruction current
Time the shortest application.
A kind of AVRCP order allocation system based on device type, wherein, system includes:
Device type acquisition module, for when mobile terminal receives AVRCP instruction, obtaining the equipment sending AVRCP instruction
Type, judge send AVRCP instruction device type whether be mobile unit;
First instruction distribution module, during for being mobile unit when device type transmission AVRCP instruction is detected, mobile terminal
By AVRCP instruction distribution to specified application;
Second instruction distribution module, during for being not mobile unit when device type transmission AVRCP instruction is detected, mobile whole
End is according to default AVRCP instruction distribution principle distribution AVRCP instruction.
The described AVRCP order allocation system based on device type, wherein, described system also includes:
Pre-set module, for arranging the default AVRCP instruction distribution of AVRCP instruction distributing method in advance in the terminal
Principle.
The described AVRCP order allocation system based on device type, wherein, described device type acquisition module specifically wraps
Include:
Device attribute acquiring unit, for when mobile terminal receives AVRCP instruction, the equipment obtaining in AVRCP instruction belongs to
Property, judge whether device attribute is bluetooth equipment;
Device type judging unit, if being bluetooth equipment for device attribute in AVRCP instruction, judges to send AVRCP instruction
Equipment whether support PBAP agreement;If supporting PBAP agreement, the device type sending AVRCP instruction is mobile unit;If
Do not support PBAP agreement, then the device type sending AVRCP instruction is not mobile unit.
The described AVRCP order allocation system based on device type, wherein, described system also includes:
Instruction parsing and performing module, instruct and parse for specifying application to obtain AVRCP, the content after execution parsing.
The described AVRCP order allocation system based on device type, wherein, described pre-set in module default
AVRCP instructs distribution principle and is specially the usage record obtaining the service of mobile terminal sound intermediate frequency, and use is distributed in AVRCP instruction
Apart from the application that current time is the shortest in record.
The invention provides a kind of AVRCP instruction distributing method based on device type and system, the present invention is mobile whole
When end receives the instruction of bluetooth AVRCP, mobile unit can be distinguished, thus the AVRCP instruction of mobile unit is only assigned to
The specific AVRCP control applied, do not affect other bluetooth equipments on mobile terminal, improves mobile terminal to blue tooth vehicular control
The response speed of application-specific.
Brief description
Fig. 1 is a kind of flow chart of the preferred embodiment of AVRCP instruction distributing method based on device type of the present invention.
Fig. 2 is the flow chart of the concrete application embodiment of the AVRCP instruction distributing method based on device type.
Fig. 3 is that a kind of function of the preferred embodiment of AVRCP order allocation system based on device type of the present invention is former
Reason block diagram.
Specific embodiment
For making the purpose of the present invention, technical scheme and effect clearer, clear and definite, below to the present invention further specifically
Bright.It should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The invention provides a kind of flow chart of the preferred embodiment of the AVRCP instruction distributing method based on device type,
As shown in figure 1, wherein, method includes:
Step S100, when mobile terminal receive AVRCP instruction when, obtain send AVRCP instruction equipment type, judge send out
Whether the device type sending AVRCP instruction is mobile unit, if so, then execution step S200, if it is not, then execution step
S300.
When being embodied as, mobile terminal and blue tooth vehicular equipment connect, and mobile terminal receives AVRCP instruction, according to
The device attribute in agreement in AVRCP instruction obtains the type of the equipment sending AVRCP instruction.
In further embodiment, also include before step S100:
The default AVRCP instruction distribution principle of step S1, in advance setting AVRCP instruction distributing method in the terminal.
When being embodied as, default AVRCP instruction distribution principle is specially using of acquisition mobile terminal sound intermediate frequency service and remembers
Record, AVRCP instruction is distributed in usage record apart from the application that current time is the shortest.
In further embodiment, step S100 specifically includes:
Step S101, when mobile terminal receive AVRCP instruction when, obtain AVRCP instruction in device attribute, judge equipment genus
Whether property is bluetooth equipment;
If device attribute is bluetooth equipment in step S102 AVRCP instruction, judge whether the equipment sending AVRCP instruction props up
Hold PBAP agreement;If supporting PBAP agreement, the device type sending AVRCP instruction is mobile unit;If not supporting, PBAP assists
View, then the device type sending AVRCP instruction is not mobile unit.
When being embodied as, the device attribute of bluetooth equipment in acquisition for mobile terminal AVRCP instruction, the equipment of bluetooth equipment belongs to
Property includes two:Major Device Class: Audio/Video Minor Device Class: Hands-free
Device.When there is above-mentioned two attribute in AVRCP is detected and instructing, judge transmission equipment for bluetooth earphone or bluetooth car
Load equipment.Next make a distinction it would be desirable to obtain the bluetooth association of this bluetooth equipment support in bluetooth earphone and blue tooth vehicular
View, if this equipment supports PBAP(phone book access profile)Phone directory synchronous protocol, then this equipment is vehicle-mounted
Equipment, if not supporting, is not mobile unit.
Step S200, mobile terminal are by AVRCP instruction distribution to specified application.
When being embodied as, when equipment transmission AVRCP instruction is detected is mobile unit, then extremely mobile eventually by instructing distribution
The specified application at end.Further, because AVRCP is audio or video control protocol, the instruction that therefore AVRCP instruction sends is sound
Frequency control protocol, therefore preferential specified application is music player application or video player application.
In further embodiment, also include after step S200:
Step S201, specified application obtain AVRCP and instruct and parse, the content after execution parsing.
It is intended that applying such as music player application or video player application when being embodied as, after obtaining AVRCP instruction,
Content in parsing AVRCP instruction, plays the content in AVRCP instruction.Specific AVRCP instructs as to such as music, video
Play, suspend, upper one first, next, F.F., rewind etc. operate.
Step S300, mobile terminal are according to default AVRCP instruction distribution principle distribution AVRCP instruction.
When being embodied as, this remote control command is distributed to the application using audio service recently by mobile terminal;For example,
Usage record is radio recently, then when remote Bluetooth devices send and play voice command, this order can be assigned to receipts
Sound machine, radio can commence play out.Wherein mobile terminal includes but is not limited to the intelligence containing bluetooth equipment such as mobile phone, panel computer
Can terminal.
Present invention also offers a kind of stream of the concrete application embodiment of the AVRCP instruction distributing method based on device type
Cheng Tu, wherein specifies application to be introduced, as shown in Fig. 2 method is as follows as a example referring to music player:
Step S10, mobile terminal and blue tooth vehicular equipment connect;
Step S20, mobile terminal receive the instruction of blue tooth vehicular device A VRCP;
Step S30, judge whether the equipment sending AVRCP instruction meets device type condition, if so, then execution step S40, if
No, then execution step S50;
Step S40, judge whether the equipment sending AVRCP instruction supports PABP agreement, if so, then execution step S60, if it is not,
Then execution step S70;
Step S50, according to default AVRCP instruct distribution principle, distribution AVRCP instruction;
Step S60, startup music player, distribution AVRCP instructs to music player;
Step S70, end.
From above method embodiment, the invention provides a kind of AVRCP instruction distributing method based on device type,
When user controls mobile terminal music to play by vehicle-mounted end, if finally the application using audio resource is not mobile terminal
When music player, user need not manually boot music player on mobile terminals;Mobile terminal can automatic decision set
Standby type, automatic music player application, music player is distributed in AVRCP instruction, improves mobile terminal to bluetooth
The response speed of vehicle-mounted control application-specific, provides users with the convenient.
In the exemplary embodiment, device can be by one or more application specific integrated circuits(ASIC), data signal
Processor(DSP), digital signal processing appts(DSPD), PLD(PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components realize, for executing said method.
In the exemplary embodiment, a kind of non-provisional computer-readable recording mediums including instruction are additionally provided, for example
Including the memory of instruction, above-mentioned instruction can be by the computing device of device to complete said method.For example, described non-transitory
Computer-readable recording medium can be ROM, random access memory(RAM), CD-ROM, tape, floppy disk and optical data storage
Equipment etc..
Present invention also offers a kind of function of the preferred embodiment of the AVRCP order allocation system based on device type is former
Reason block diagram, as shown in figure 3, system includes:
Device type acquisition module 100, for when mobile terminal receives AVRCP instruction, obtaining and sending setting of AVRCP instruction
Standby type, judges whether the device type sending AVRCP instruction is mobile unit;Specifically as shown in embodiment of the method.
First instruction distribution module 200, during for being mobile unit when device type transmission AVRCP instruction is detected,
Mobile terminal is by AVRCP instruction distribution to specified application;Specifically as shown in embodiment of the method.
Second instruction distribution module 300, for not being mobile unit when the device type sending AVRCP instruction is detected
When, mobile terminal is according to default AVRCP instruction distribution principle distribution AVRCP instruction;Specifically as shown in embodiment of the method.
The described AVRCP order allocation system based on device type, wherein, described system also includes:
Pre-set module, for arranging the default AVRCP instruction distribution of AVRCP instruction distributing method in advance in the terminal
Principle;Specifically as shown in embodiment of the method.
The described AVRCP order allocation system based on device type, wherein, described device type acquisition module specifically wraps
Include:
Device attribute acquiring unit, for when mobile terminal receives AVRCP instruction, the equipment obtaining in AVRCP instruction belongs to
Property, judge whether device attribute is bluetooth equipment;Specifically as shown in embodiment of the method.
Device type judging unit, if being bluetooth equipment for device attribute in AVRCP instruction, judges to send AVRCP
Whether the equipment of instruction supports PBAP agreement;If supporting PBAP agreement, the device type sending AVRCP instruction is vehicle-mounted setting
Standby;If not supporting PBAP agreement, the device type sending AVRCP instruction is not mobile unit;Specifically as embodiment of the method institute
Show.
The described AVRCP order allocation system based on device type, wherein, described system also includes:
Instruction parsing and performing module, instruct and parse for specifying application to obtain AVRCP, the content after execution parsing;Specifically
As shown in embodiment of the method.
The described AVRCP order allocation system based on device type, wherein, described pre-set in module default
AVRCP instructs distribution principle and is specially the usage record obtaining the service of mobile terminal sound intermediate frequency, and use is distributed in AVRCP instruction
Apart from the application that current time is the shortest in record;Specifically as shown in embodiment of the method.
In sum, the invention provides a kind of AVRCP instruction distributing method based on device type and system, method bag
Include:When mobile terminal receives AVRCP instruction, obtain the type of the equipment sending AVRCP instruction, judge that sending AVRCP refers to
Whether the device type of order is mobile unit;When the device type sending AVRCP instruction is detected for mobile unit, mobile whole
End is by AVRCP instruction distribution to specified application;When device type transmission AVRCP instruction is detected is not mobile unit, move
Dynamic terminal is according to default AVRCP instruction distribution principle distribution AVRCP instruction.The present invention receives bluetooth AVRCP in mobile terminal and refers to
When order, mobile unit can be distinguished, thus the AVRCP instruction of mobile unit is only assigned to specific application, not affect
On mobile terminal, the AVRCP of other bluetooth equipments controls, and improves the response speed that mobile terminal controls application-specific to blue tooth vehicular
Degree.
It should be appreciated that the application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can
To be improved according to the above description or to convert, all these modifications and variations all should belong to the guarantor of claims of the present invention
Shield scope.