The content of the invention
The technical problem to be solved in the present invention is, for the drawbacks described above of prior art, there is provided one kind is based on mobile whole
Many applications at end use the control method and system of FLASH LED, it is intended to both met mobile terminal by the present invention and realized multiple
Control during using using same FLASH LED, can also make mobile terminal each state of a control for FLASH LED of application
The application that can be run according to current foreground in real time switches over control and uses, it is to avoid controls confusion to FLASH LED, is user
Provides convenient.
The technical proposal for solving the technical problem of the invention is as follows:
A kind of many applications based on mobile terminal use the control method of FLASH LED, wherein, comprise the following steps:
Whether the application in A, detection mobile terminal using FLASH LED is in open mode;
B, when the first application is in open mode and when being currently in use FLASH LED, detect the second application and open and need
Switch using FLASH LED, then control for the first application to switch to backstage and preserve behaviour of first application using FLASH LED
Make control information, and control second is applied and uses FLASH LED on foreground;
C, after second exits foreground using closing, then find out apart from current time it is nearest first application operation control
Information processed, switches to foreground and uses FLASH LED, and control FLASH LED according to the control information operation by the first application
The brightness that brightness is preserved before being is set.
Many applications based on mobile terminal use the control method of FLASH LED, wherein, the step B is specifically wrapped
Include:
B11, when the first application is in open mode and when being currently in use FLASH LED, detect the second application and open simultaneously
Need switching use FLASH LED, storage be being currently used FLASH LED first application application number, current time,
FLASH LED luminances;
B12, when detecting the second application using FLASH LED and being switched to foreground, control second is applied preceding
Platform uses FLASH LED.
Many applications based on mobile terminal use the control method of FLASH LED, wherein, the step B also includes;
B13, when the second application is in open mode and when being currently in use FLASH LED on foreground, detect the first application
Need to switch to foreground and use FLASH LED, storage is being currently used the application number of second application of FLASH LED, current
Time, FLASH LED luminances;
B14, when detecting the first application using FLASH LED and being switched to foreground, control first is applied on foreground
Using FLASH LED, and control to delete application number, current time, the FLASH LED luminances of the first stored application.
Many applications based on mobile terminal use the control method of FLASH LED, wherein, the control information operation
Including:
Application number, for identifying the application numbers to FLASH LED operations;
Operating time, the time on backstage is switched to for recording described application the last time;
Brightness is set, for recording setting of the application to FLASH LED luminances.
Many applications based on mobile terminal use the control method of FLASH LED, wherein, the step B is also wrapped
Include:
B21:Have in mobile terminal is detected and be opened using first application of FLASH LED, and now mobile terminal
When being opened in the absence of the application for being currently in use FLASH LED, then any operation is not done;
B22:Have in mobile terminal is detected and be opened using second application of FLASH LED, and now mobile terminal
When being opened in the presence of the first application for being currently in use FLASH LED, the first application that storage is being currently used is to FLASH LED
Control information operation;
B23:Have in mobile terminal is detected and be switched to foregrounding state using second application of FLASH LED
When, the first application that storage is being currently used is grasped to the control information operation of FLASH LED while deleting and being switched to foreground
The control information operation of the second application made.
Many applications based on mobile terminal use the control method of FLASH LED, wherein, the step C also includes:
C1:When have in detecting mobile terminal be closed using the background application of FLASH LED when, deleting the backstage should
With the control information operation to FLASH LED;
C2:When have in detecting mobile terminal be closed using the foreground application of FLASH LED when, deleting the foreground should
With the control information operation to FLASH LED, while searching the application message nearest apart from current time, described nearest is answered
With switching to foreground and control the brightness that is preserved before FLASH LED luminances are to set.
A kind of many applications based on mobile terminal use the control system of FLASH LED, wherein, including:
Using detection module is opened, whether the application of FLASH LED is used in mobile terminal for detecting in open shape
State;
First control module, for when the first application is in open mode and when being currently in use FLASH LED, detecting the
Two applications are opened and need switching to use FLASH LED, then control that the first application is switched into backstage and the first application is preserved to make
Applied and used FLASH LED on foreground with the control information operation of FLASH LED, and control second;
Second control module, for after second exits foreground using closing, then finding out nearest apart from current time
The control information operation of the first application, switches to foreground and uses FLASH LED according to the control information operation by the first application,
And control the brightness preserved before FLASH LED luminances are to set;
The control information operation includes:
Application number, for identifying the application numbers to FLASH LED operations;
Operating time, the time on backstage is switched to for recording described application the last time;
Brightness is set, for recording setting of the application to FLASH LED luminances.
Many applications based on mobile terminal use the control system of FLASH LED, wherein, first control module
Specifically include:
First applies change detection unit, for when the first application is in open mode and when being currently in use FLASH LED,
Detect the second application to open and need switching to use FLASH LED, storage is being currently used first application of FLASH LED
Application number, current time, FLASH LED luminances;
First applies switch control unit, before the second application for that ought detect using FLASH LED is switched to
During platform, control second is applied and uses FLASH LED on foreground.
Many applications based on mobile terminal use the control system of FLASH LED, wherein, first control module
Also include:
Second applies change detection unit, for being currently in use FLASH in open mode and on foreground when the second application
During LED, detect the first application and need to switch to foreground and use FLASH LED, storage is being currently used the of FLASH LED
Application number, current time, the FLASH LED luminances of two applications;
Second applies switch control unit, and foreground is switched to using first application of FLASH LED for working as to detect
When, control first is applied and uses FLASH LED on foreground, and controls to delete the application number of stored first application, current
Time, FLASH LED luminances.
Many applications based on mobile terminal use the control system of FLASH LED, wherein, first control module
Also include:
Control unit is opened in first application, and first application of FLASH LED is used for having in mobile terminal is detected
It is opened, and when now mobile terminal is opened in the absence of the application for being currently in use FLASH LED, does not then do any operation;
Control unit is opened in second application, and second application of FLASH LED is used for having in mobile terminal is detected
It is opened, and now mobile terminal has be currently in use FLASH LED first using when being opened, storage is being currently used
The first application to the control information operation of FLASH LED;
3rd applies switch control unit, and second application of FLASH LED is used for having in mobile terminal is detected
When being switched to foregrounding state, the first application that storage is being currently used to the control information operation of FLASH LED, together
When delete be switched to foregrounding second application control information operation.
Many applications based on mobile terminal use the control system of FLASH LED, wherein, second control module
Including:
First applies closing control unit, for there is the background application using FLASH LED in mobile terminal is detected
When being closed, control information operation of the background application to FLASH LED is deleted;
Second applies closing control unit, for there is the foreground application using FLASH LED in mobile terminal is detected
When being closed, control information operation of the foreground application to FLASH LED is deleted, while searching nearest apart from current time
Application message, switches to the nearest application foreground and controls the brightness preserved before FLASH LED luminances are to set.
Many applications based on mobile terminal provided by the present invention use the control method and system of FLASH LED, described
Method is specifically included:Whether the application in detection mobile terminal using FLASH LED is in open mode;When the first application is in
Open mode and when being currently in use FLASH LED, detects the second application and opens and need switching to use FLASH LED, then control
First application is switched to backstage and preserves control information operation of first application using FLASH LED by system, and control second should
FLASH LED are used used in foreground;After second exits foreground using closing, then find out apart from current time it is nearest first
The control information operation of application, switches to foreground and uses FLASH LED, and control according to the control information operation by the first application
The brightness that FLASH LED luminances processed are preserved before being is set.The present invention had both met mobile terminal and had realized that multiple applications were used
The same control of FLASH LED, can also enable mobile terminal each state of a control for FLASH LED of application root in real time
The application run according to current foreground switches over control and uses, it is to avoid controls confusion to FLASH LED, has provided the user side
Just.
Specific embodiment
The invention discloses a kind of many applications based on mobile terminal using the control method and system of FLASH LED, it is
Make the objects, technical solutions and advantages of the present invention clearer, clear and definite, the embodiment that develops simultaneously referring to the drawings enters one to the present invention
Step is described in detail.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not used to limit this hair
It is bright.
Refer to Fig. 1, Fig. 1 is the of the control method that many applications of the present invention based on mobile terminal use FLASH LED
The flow chart of one preferred embodiment.The many applications based on mobile terminal shown in Fig. 1 are wrapped using the control method of FLASH LED
Include:
Whether the application in step S101, detection mobile terminal using FLASH LED is in open mode;
Mobile terminal application involved in the embodiment of the present invention, the application of FLASH LED is used just for those, for
Do not use the application of FLASH LED not it is considered herein that within the scope of, it is and separate between many applications.In specific implementation
Before, it is necessary to carry out state-detection to these applications, for example, judge whether it is in and beat opening/closing, switch to foreground/backstage etc.
State, it is described it is various apply in the state of difference, it is different to the operation of FLASH LED.
Step S102, when the first application is in open mode and when being currently in use FLASH LED, detect the second application and beat
Open and need switching to use FLASH LED, then control that the first application is switched into backstage and the first application is preserved to use FLASH
The control information operation of LED, and control second apply foreground use FLASH LED;
In the embodiment of the present invention, setting a memory space is used to store control letter of many applications to FLASH LED operations
Breath, the application includes to the control information operation of FLASH LED:Application number, for identifying the application to FLASH LED operations
Numbering, as using 2, using 5, each application correspondence one is individually numbered;It is operating time, nearest for recording the application
Once it is switched to the time on backstage;Brightness is set, described bright for recording setting of the application to FLASH LED luminances
Degree is set includes that opening, closing and brightness set three functions;If the brightness value is set to 0, then it represents that at FLASH LED
In closed mode, otherwise, then it represents that FLASH LED are in open mode, and the brightness value is bigger, and FLASH LED are brighter.
Therefore, when the first application is in open mode and is currently in use FLASH LED, detect the second application and open simultaneously
Need switching to use FLASH LED, then control that the first application is switched into backstage and the first application is preserved to use FLASH LED's
Control information operation, and control second apply foreground use FLASH LED.Specifically include following situation.
The step of situation one includes as follows:
B11, when the first application is in open mode and when being currently in use FLASH LED, detect the second application and open simultaneously
Need switching use FLASH LED, storage be being currently used FLASH LED first application application number, current time,
FLASH LED luminances;
B12, when detecting the second application using FLASH LED and being switched to foreground, control second is applied preceding
Platform uses FLASH LED.
The step of situation two includes as follows:
B13, when the second application is in open mode and when being currently in use FLASH LED on foreground, detect the first application
Need to switch to foreground and use FLASH LED, storage is being currently used the application number of second application of FLASH LED, current
Time, FLASH LED luminances;
B14, when detecting the first application using FLASH LED and being switched to foreground, control first is applied on foreground
Using FLASH LED, and control to delete application number, current time, the FLASH LED luminances of the first stored application.
The step of situation three includes as follows:
When there is the first application using FLASH LED to be opened in detecting mobile terminal, and now mobile terminal is not
When being opened in the presence of the application for being currently in use FLASH LED, then any operation is not done, for example, detect be opened using 2, and
There is no other application using FLASH LED in current system, then without storing any control information in the terminal.
Have in mobile terminal is detected and be opened using second application of FLASH LED, and now mobile terminal is present
When the first application for being currently in use FLASH LED is opened, behaviour of the first application that storage is being currently used to FLASH LED
Make control information, for example, detect be opened using 2, and the application that FLASH LED are being currently used is to apply 5, then moving
Store the control information operation of application 5 in dynamic terminal, including the number information of application 5, operating time information and brightness are set
Information.
When there is the second application using FLASH LED to be switched to foregrounding state in detecting mobile terminal, deposit
Be being currently used first is stored up using the control information operation to FLASH LED, while deletion is switched to foregrounding
The control information operation of the second application, for example, detect being switched to foreground using 2, and is being currently used FLASH LED's
Using to apply 5, then 5 control information operations, including number information, the operating time for applying 5 are applied in storage in the terminal
Information and brightness configuration information, while deleting the control information operation of application 2 in the terminal.
Similarly, when have in detecting mobile terminal be closed using the background application of FLASH LED when, delete the backstage
Using the control information operation to FLASH LED;Have in mobile terminal is detected and closed using the foreground application of FLASH LED
When closing, control information operation of the foreground application to FLASH LED is deleted, while searching the application nearest apart from current time
Information, switches to the nearest application foreground and controls the brightness preserved before FLASH LED luminances are to set.
Step S103, after second exits foreground using closing, then find out apart from current time it is nearest first application
Control information operation, the first application is switched to by foreground according to the control information operation and uses FLASH LED, and control
The brightness that FLASH LED luminances are preserved before being is set;
In the embodiment of the present invention, when have in detecting mobile terminal be closed using the background application of FLASH LED when, delete
Except the background application is to the control information operation of FLASH LED;Before having in detecting mobile terminal using FLASH LED
When platform application is closed, control information operation of the foreground application to FLASH LED is deleted, while searching apart from current time
Nearest application message, by the nearest application switch to foreground and control to be preserved before FLASH LED luminances are it is bright
Degree is set, and the brightness is set includes that opening, closing and brightness set three functions;It is preferred that referring to open, close.If described
Brightness value is set to 0, then it represents that FLASH LED are closed, otherwise, then it represents that FLASH LED are in open mode, and
The brightness value is bigger, and FLASH LED are brighter.
Below will the present invention will be further described by specific Application Example.Fig. 2 is the present invention based on mobile whole
Many applications at end use the schematic diagram of the second preferred embodiment of the control method of FLASH LED.As shown in Fig. 2 present invention side
Method is realized including video recording application 300, flashlight application 400, FLASH in concrete application using some functional modules are set
LED pipe reason module 500, FLASH LED hardware 600.FLASH LED pipes reason module 500 is used to manage video recording application 300, torch
Use of the cylinder application 400 for FLASH LED hardware 600.
Wherein, also include inside FLASH LED pipes reason module 500:It is used to detect various making using detection module 501 is opened
With the opening operation of the application of FLASH LED, and the operation that application is switched to foreground;Used using detection module 502 is closed
In the shutoff operation of the application for detecting various use FLASH LED, including apply and be closed at foreground and apply at backstage
It is closed;Information storage module 503 is used for when application is opened detection module 501 and detected using opening, it will should this
With the state of a control information Store for FLASH LED in information storage module 503, the information of the storage includes that application is compiled
Number information(It is 1 such as to set video recording application numbers, and flashlight application numbers are 2), operating time information and brightness letter is set
Breath;Control module 504 is used to control FLASH LED hardware 600.
FLASH LED hardware 600, it includes opening, closes, brightness sets three functions, and when opening, FLASH LED are hard
During part 600, FLASH LED are lighted, and when FLASH LED hardware 600 is closed, FLASH LED do not work, and FLASH LED are hard in addition
Part 600 also receives brightness setting, and brightness value sets higher, then FLASH LED are brighter.
When application opening detection module 501 is detected to be opened using the application of FLASH LED, in information Store mould
Storage is being currently used application numbers, operating time, the FLASH LED luminances of the FLASH LED applications in block 503;For example,
Video recording application 300 is opened, and the application that FLASH LED are being currently used is flashlight application 400, then in information storage module
Application number 2, operating time, FLASH LED luminances are stored in 503;Again for example, video recording is opened using 300, and currently without making
With the application of FLASH LED, then without storing any information in information storage module 503;
When application opening detection module 501 is detected is switched to foreground using the application of FLASH LED, in information
Storage is being currently used application number, operating time, the FLASH LED luminances of the FLASH LED applications in memory module 503;
And the information of the application for being switched to foreground is deleted in information storage module 503;For example, before video recording is switched to using 300
Platform, and the application that FLASH LED are being currently used is flashlight application 400, then application is stored in information storage module 503
Application number 2, operating time, FLASH LED luminances, delete the information of video recording application 300 in information storage module 503.
Similarly, when the application that application closing detection module 502 is detected positioned at backstage is closed, then in information storage module
The information of the application is deleted in 503;When the application that application closing detection module 502 is detected positioned at foreground is closed, then in letter
The application message nearest apart from current time is found out in breath memory module 503, and the application is switched into foreground and is controlled
The brightness that FLASH LED luminances are preserved before being is set;Then the information of the application is deleted in information storage module 503.
Therefore, both met mobile terminal manufacturer with a FLASH LED to realize multiple applications using the present invention
Using the control of FLASH LED, each is not chaotic using the state of a control for FLASH LED also to make mobile terminal,
Provide users with the convenient.
Based on above-described embodiment, the present invention also provides the control that a kind of many applications based on mobile terminal use FLASH LED
System processed, as shown in figure 3, including:
Using detection module 100 is opened, whether the application of FLASH LED is used in mobile terminal for detecting in opening
State;As detailed above.
First control module 200, for when the first application is in open mode and is currently in use FLASH LED, detecting
Opened to the second application and need switching to use FLASH LED, then controlled for the first application to switch to backstage and preservation first should
Applied and used FLASH LED on foreground with the control information operation using FLASH LED, and control second;As detailed above.
Second control module 300, for after second exits foreground using closing, then finding out nearest apart from current time
The first application control information operation, the first application is switched to foreground and uses FLASH according to the control information operation
LED, and control the brightness preserved before FLASH LED luminances are to set;As detailed above.
Further, many applications based on mobile terminal use the control system of FLASH LED, as shown in figure 4,
First control module 200 includes:
First application change detection unit 210, for when the first application is in open mode and is currently in use FLASH LED
When, detecting the second application and open and need switching to use FLASH LED, storage is being currently used the first of FLASH LED
The application number of application, current time, FLASH LED luminances;As detailed above.
First applies switch control unit 220, is switched to using second application of FLASH LED for working as to detect
During foreground, control second is applied and uses FLASH LED on foreground;As detailed above.
Further, many applications based on mobile terminal use the control system of FLASH LED, as shown in figure 5, institute
Stating operation memory module 200 also includes:
Second application change detection unit 230, for being currently in use in open mode and on foreground when the second application
During FLASH LED, detecting the first application needs to switch to foreground using FLASH LED, and storage is being currently used FLASH
Application number, current time, the FLASH LED luminances of second application of LED;As detailed above.
Second application switch control unit 240, before the first application for that ought detect using FLASH LED is switched to
During platform, control first is applied and uses FLASH LED on foreground, and control to delete stored first application application number, when
Preceding time, FLASH LED luminances;As detailed above.
Further, many applications based on mobile terminal use the control system of FLASH LED, as shown in fig. 6, institute
Stating operation memory module 200 also includes:
Control unit 250 is opened in first application, should using the first of FLASH LED for having in mobile terminal is detected
With being opened, and now mobile terminal does not exist when being currently in use the application of FLASH LED and being opened, then do not do any operation;
As detailed above.
Control unit 260 is opened in second application, should using the second of FLASH LED for having in mobile terminal is detected
With being opened, and now mobile terminal is present when being currently in use first application of FLASH LED and being opened, and storage currently makes
Control information operation of first application to FLASH LED;As detailed above.
3rd applies switch control unit 270, should using the second of FLASH LED for having in mobile terminal is detected
During with being switched to foregrounding state, be being currently used first is stored using the control information operation to FLASH LED,
The control information operation of the second application for being switched to foregrounding is deleted simultaneously;As detailed above.
Further, many applications based on mobile terminal use the control system of FLASH LED, as shown in fig. 7, institute
Stating the second control module 300 also includes:
First application closing control unit 310, should using the backstage of FLASH LED for having in mobile terminal is detected
During with being closed, control information operation of the background application to FLASH LED is deleted;As detailed above.
Second application closing control unit 320, should using the foreground of FLASH LED for having in mobile terminal is detected
During with being closed, control information operation of the foreground application to FLASH LED is deleted, while searching nearest apart from current time
Application message, the nearest application is switched into foreground and controls the brightness preserved before FLASH LED luminances are to set
Put;As detailed above.
Based on above-described embodiment, the present invention also provides a kind of embodiment of mobile terminal, the mobile end described in the present embodiment
End includes that many applications based on mobile terminal described above use the control system of FLASH LED.
In sum, many applications based on mobile terminal provided by the present invention using FLASH LED control method and
System, methods described is specifically included:Whether the application in detection mobile terminal using FLASH LED is in open mode;When
When one application is in open mode and is currently in use FLASH LED, detect the second application and open and need switching to use FLASH
LED, then control that the first application is switched into backstage and control information operation of first application using FLASH LED is preserved, and control
System second is applied and uses FLASH LED on foreground;After second exits foreground using closing, then find out apart from current time most
The control information operation of the first near application, switches to foreground and uses FLASH according to the control information operation by the first application
LED, and control the brightness preserved before FLASH LED luminances are to set.The present invention had both met mobile terminal manufacturer and had used one
FLASH LED realize controls of multiple applications using FLASH LED, can also make mobile terminal each application for FLASH
The state of a control of LED is not chaotic, provides users with the convenient.
It should be appreciated that application of the invention is not limited to above-mentioned citing, and for those of ordinary skills, can
To be improved according to the above description or be converted, such as when scope being expanded to multiple applications using same LEDs, such case
Under limitation is not carried out to the number of LED and can there are multiple LEDs to switch in turn, it is to avoid scope is only limitted to use only one
On the mobile terminal of LEDs, all these modifications and variations should all belong to the protection domain of appended claims of the present invention.