Summary of the invention
The technical problem to be solved in the present invention is, for the above-mentioned defect of prior art, a kind of many application based on mobile terminal are provided to use control method and the system of FLASH LED, be intended to both meet by the present invention the control that mobile terminal realizes when multiple application uses same FLASH LED, also each application of mobile terminal can be made to carry out switching controls use according to the application of current foreground operation in real time for the state of a control of FLASH LED, avoid controlling confusion, for user provides convenience to FLASH LED.
The technical scheme that technical solution problem of the present invention adopts is as follows:
Many application based on mobile terminal use a control method of FLASH LED, wherein, comprise the steps:
The application of FLASH LED is used whether to be in open mode in A, detection mobile terminal;
B, when the first application is in open mode and is using FLASH LED, detect that the second application is opened and needed to switch and use FLASH LED, then control the first application is switched to backstage and preserves the control information operation that the first application uses FLASH LED, and control second and be applied in foreground and use FLASH LED;
C, after when the second application, closedown exits foreground, then find out the control information operation of the first nearest application of distance current time, according to described control information operation, the first application is switched to foreground and uses FLASH LED, and control FLASH LED luminance for before the brightness of preserving arrange.
Described many application based on mobile terminal use the control method of FLASH LED, and wherein, described step B specifically comprises:
B11, when the first application is in open mode and is using FLASH LED, detect that the second application is opened and needed to switch and use FLASH LED, store current the first application number applied, current time, the FLASH LED luminance that are using FLASH LED;
B12, when detect use second of FLASH LED the application to be switched to foreground time, control second and be applied in foreground and use FLASH LED.
Described many application based on mobile terminal use the control method of FLASH LED, and wherein, described step B also comprises;
B13, when second application be in open mode and using FLASH LED on foreground time, detect that the first application needs to switch to foreground and uses FLASH LED, store current the second application number applied, current time, the FLASH LED luminance that are using FLASH LED;
B14, when detect use first of FLASH LED the application to be switched to foreground time, control first and be applied in foreground and use FLASH LED, and control application number, current time, the FLASH LED luminance of deleting the first application stored.
Described many application based on mobile terminal use the control method of FLASH LED, and wherein, described control information operation comprises:
Application number, for identifying the application numbers operated FLASH LED;
Operating time, for recording the described application the last time being switched to backstage;
Brightness is arranged, for recording the setting of described application to FLASH LED luminance.
Described many application based on mobile terminal use the control method of FLASH LED, and wherein, described step B also comprises:
B21: use first of FLASH LED the application to be opened when detecting in mobile terminal to have, and now mobile terminal does not exist when using the application of FLASH LED to be opened, then do not do any operation;
B22: use second of FLASH LED the application to be opened when detecting in mobile terminal to have, and now mobile terminal exists and is using first of FLASH LED the application when being opened, and stores the current control information operation of the first application to FLASH LED used;
B23: when detecting in mobile terminal that having second of use FLASH LED to apply is switched to foregrounding state, store the current control information operation of the first application to FLASH LED used, delete the control information operation of the second application being switched to foregrounding simultaneously.
Described many application based on mobile terminal use the control method of FLASH LED, and wherein, described step C also comprises:
C1: when detect in mobile terminal have use the background application of FLASH LED to be closed time, delete the control information operation of described background application to FLASH LED;
C2: when detect in mobile terminal have use the foreground application of FLASH LED to be closed time, delete the control information operation of described foreground application to FLASH LED, search the nearest application message of distance current time simultaneously, described application is recently switched to foreground and control FLASH LED luminance for before the brightness of preserving arrange.
Many application based on mobile terminal use a control system of FLASH LED, wherein, comprising:
Detection module is opened in application, whether is in open mode for detecting in mobile terminal the application using FLASH LED;
First control module, for when the first application is in open mode and is using FLASH LED, detect that the second application is opened and needed to switch and use FLASH LED, then control the first application is switched to backstage and preserves the control information operation that the first application uses FLASH LED, and control second and be applied in foreground and use FLASH LED;
Second control module, for after foreground is exited in the second application closedown, then find out the control information operation of the first nearest application of distance current time, according to described control information operation, the first application is switched to foreground and uses FLASH LED, and control FLASH LED luminance for before the brightness of preserving arrange;
Described control information operation comprises:
Application number, for identifying the application numbers operated FLASH LED;
Operating time, for recording the described application the last time being switched to backstage;
Brightness is arranged, for recording the setting of described application to FLASH LED luminance.
Described many application based on mobile terminal use the control system of FLASH LED, and wherein, described first control module specifically comprises:
First application change detection unit, for when the first application is in open mode and is using FLASH LED, detect that the second application is opened and needed to switch and use FLASH LED, store current the first application number applied, current time, the FLASH LED luminance that are using FLASH LED;
First application switch control unit, for when detecting that using second of FLASH LED to apply is switched to foreground, controlling second and being applied in foreground use FLASH LED.
Described many application based on mobile terminal use the control system of FLASH LED, and wherein, described first control module also comprises:
Second application change detection unit, for when the second application is in open mode and is using FLASH LED on foreground, detect that the first application needs to switch to foreground and uses FLASH LED, store current the second application number applied, current time, the FLASH LED luminance that are using FLASH LED;
Second application switch control unit, for when detecting that using first of FLASH LED to apply is switched to foreground, control first and be applied in foreground use FLASH LED, and control application number, current time, the FLASH LED luminance of deleting the first application stored.
Described many application based on mobile terminal use the control system of FLASH LED, and wherein, described first control module also comprises:
Control unit is opened in first application, and for using first of FLASH LED the application to be opened when detect in mobile terminal to have, and now mobile terminal does not exist when using the application of FLASH LED to be opened, then do not do any operation;
Control unit is opened in second application, for using second of FLASH LED the application to be opened when detecting in mobile terminal to have, and now mobile terminal exists and is using first of FLASH LED the application when being opened, and stores the current control information operation of the first application to FLASH LED used;
3rd application switch control unit, for when detecting in mobile terminal that having second of use FLASH LED to apply is switched to foregrounding state, store the current control information operation of the first application to FLASH LED used, delete the control information operation of the second application being switched to foregrounding simultaneously.
Described many application based on mobile terminal use the control system of FLASH LED, and wherein, described second control module comprises:
First application closing control unit, for when detect in mobile terminal have the background application of use FLASH LED to be closed time, delete the control information operation of described background application to FLASH LED;
Second application closing control unit, for when detect in mobile terminal have use the foreground application of FLASH LED to be closed time, delete the control information operation of described foreground application to FLASH LED, search the nearest application message of distance current time simultaneously, described application is recently switched to foreground and control FLASH LED luminance for before the brightness of preserving arrange.
Many application based on mobile terminal provided by the present invention use control method and the system of FLASH LED, and described method specifically comprises: detect in mobile terminal and use the application of FLASH LED whether to be in open mode; When the first application is in open mode and is using FLASH LED, detect that the second application is opened and needed to switch and use FLASH LED, then control the first application is switched to backstage and preserves the control information operation that the first application uses FLASH LED, and control second and be applied in foreground and use FLASH LED; After foreground is exited in the second application closedown, then find out the control information operation of the first nearest application of distance current time, according to described control information operation, the first application is switched to foreground and uses FLASH LED, and control FLASH LED luminance for before the brightness of preserving arrange.The present invention had both met mobile terminal and had realized the control that multiple application uses same FLASH LED, also each application of mobile terminal can be made to carry out switching controls use according to the application of current foreground operation in real time for the state of a control of FLASH LED, avoid controlling confusion to FLASH LED, provide users with the convenient.
Embodiment
The invention discloses control method and system that a kind of many application based on mobile terminal use FLASH LED, for making object of the present invention, technical scheme and advantage clearly, clearly, developing simultaneously referring to accompanying drawing, the present invention is described in more detail for embodiment.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
Refer to Fig. 1, Fig. 1 is the flow chart of the first preferred embodiment of the control method of the many application use FLASH LED that the present invention is based on mobile terminal.The many application based on mobile terminal shown in Fig. 1 use the control method of FLASH LED, comprising:
The application of FLASH LED is used whether to be in open mode in step S101, detection mobile terminal;
Mobile terminal application involved in the embodiment of the present invention, only uses the application of FLASH LED for those, for not using the application of FLASH LED not within this limit of consideration, and separate between described many application.Before concrete enforcement, need to carry out state-detection to these application, such as, judge whether it is in opening/closing, switch to the states such as foreground/backstage, described multiple be applied in different states under, to the operation difference of FLASH LED.
Step S102, when the first application is in open mode and is using FLASH LED, detect that the second application is opened and needed to switch and use FLASH LED, then control the first application is switched to backstage and preserves the control information operation that the first application uses FLASH LED, and control second and be applied in foreground and use FLASH LED;
In the embodiment of the present invention, the control information that a memory space operates FLASH LED for storing many application is set, the control information operation of described application to FLASH LED comprises: application number, for identifying the application numbers operated FLASH LED, as applied 2, applying 5, the numbering that each application correspondence one is independent; Operating time, for recording the described application the last time being switched to backstage; Brightness is arranged, and for recording the setting of described application to FLASH LED luminance, described brightness arranges to comprise and opens, to close and brightness arranges three functions; If described brightness value is set to 0, then represent that FLASH LED is in closed condition, otherwise then represent that FLASH LED is in open mode, and described brightness value is larger, FLASH LED is brighter.
Therefore, when the first application is in open mode and is using FLASH LED, detect that the second application is opened and needed to switch and use FLASH LED, then control the first application is switched to backstage and preserves the control information operation that the first application uses FLASH LED, and control second and be applied in foreground and use FLASH LED.Specifically comprise following situation.
Situation one step comprises as follows:
B11, when the first application is in open mode and is using FLASH LED, detect that the second application is opened and needed to switch and use FLASH LED, store current the first application number applied, current time, the FLASH LED luminance that are using FLASH LED;
B12, when detect use second of FLASH LED the application to be switched to foreground time, control second and be applied in foreground and use FLASH LED.
Situation two step comprises as follows:
B13, when second application be in open mode and using FLASH LED on foreground time, detect that the first application needs to switch to foreground and uses FLASH LED, store current the second application number applied, current time, the FLASH LED luminance that are using FLASH LED;
B14, when detect use first of FLASH LED the application to be switched to foreground time, control first and be applied in foreground and use FLASH LED, and control application number, current time, the FLASH LED luminance of deleting the first application stored.
Situation three step comprises as follows:
When detecting in mobile terminal that having first of use FLASH LED to apply is opened, and now mobile terminal does not exist when using the application of FLASH LED to be opened, then do not do any operation, such as, detect that application 2 is opened, and in current system, do not have other to be applied in use FLASH LED, then without the need to storing any control information in the terminal.
Second of FLASH LED the application is used to be opened when detecting in mobile terminal to have, and now mobile terminal exists and is using first of FLASH LED the application when being opened, store the current control information operation of the first application to FLASH LED used, such as, detect that application 2 is opened, and currently using that FLASH LED's be applied as application 5, then store the control information operation of application 5 in the terminal, comprise the number information of application 5, operating time information and brightness configuration information.
When detecting in mobile terminal that having second of use FLASH LED to apply is switched to foregrounding state, store the current control information operation of the first application to FLASH LED used, delete the control information operation of the second application being switched to foregrounding simultaneously, such as, detect that application 2 is switched to foreground, and currently using that FLASH LED's be applied as application 5, then store application 5 control information operation in the terminal, comprise the number information of application 5, operating time information, and brightness configuration information, delete the control information operation of application 2 in the terminal simultaneously.
In like manner, when detect in mobile terminal have use the background application of FLASH LED to be closed time, delete the control information operation of described background application to FLASH LED; When detect in mobile terminal have use the foreground application of FLASH LED to be closed time, delete the control information operation of described foreground application to FLASH LED, search the nearest application message of distance current time simultaneously, described application is recently switched to foreground and control FLASH LED luminance for before the brightness of preserving arrange.
Step S103, after when the second application, closedown exits foreground, then find out the control information operation of the first nearest application of distance current time, according to described control information operation, the first application is switched to foreground and uses FLASH LED, and control FLASH LED luminance for before the brightness of preserving arrange;
In the embodiment of the present invention, when detect in mobile terminal have use the background application of FLASH LED to be closed time, delete the control information operation of described background application to FLASH LED; When detect in mobile terminal have use the foreground application of FLASH LED to be closed time, delete the control information operation of described foreground application to FLASH LED, search the application message that distance current time is nearest simultaneously, described application is recently switched to foreground and control FLASH LED luminance for before the brightness of preserving arrange, described brightness arranges to comprise and opens, to close and brightness arranges three functions; Preferably refer to unlatching, close.If described brightness value is set to 0, then represent that FLASH LED is in closed condition, otherwise then represent that FLASH LED is in open mode, and described brightness value is larger, FLASH LED is brighter.
Below by by concrete Application Example, the present invention will be further described.Fig. 2 is the schematic diagram of the second preferred embodiment of the control method of the many application use FLASH LED that the present invention is based on mobile terminal.As shown in Figure 2, the inventive method is when embody rule, and employing arranges some functional modules to realize and comprises video recording application 300, flashlight application 400, FLASH LED pipe reason module 500, FLASH LED hardware 600.FLASH LED pipe reason module 500 is for managing video recording application 300, flashlight application 400 for the use of FLASH LED hardware 600.
Wherein, FLASH LED pipe reason module 500 inside also comprises: application opens detection module 501 for detecting the opening operation of the application of various use FLASH LED, and application is switched to the operation on foreground; Application closes detection module 502 for detecting the shutoff operation of the application of various use FLASH LED, comprises when to be closed when being applied in foreground and to be applied in backstage and being closed; When information storage module 503 has detected that application is opened for opening detection module 501 when application, will this application be stored in information storage module 503 for the state of a control information of FLASH LED, the information of described storage comprises application numbers information (if setting video recording application numbers is 1, flashlight application numbers is 2), operating time information and brightness configuration information; Control module 504 is for control FLASH LED hardware 600.
FLASH LED hardware 600, it comprise open, close, brightness arranges three functions, when opening FLASH LED hardware 600, FLASH LED lights, when closing FLASH LED hardware 600, FLASH LED does not work, and FLASH LED hardware 600 also accepts brightness setting in addition, brightness value arranges higher, then FLASH LED is brighter.
When apply open detection module 501 detect use the application of FLASH LED to be opened time, store in information storage module 503 current using this application of FLASH LED application numbers, the operating time, FLASH LED luminance; Such as, video recording application 300 is opened, and the current flashlight that is applied as of FLASH LED that using applies 400, then in information storage module 503, store application number 2, operating time, FLASH LED luminance; Again such as, video recording application 300 is opened, and the current application not using FLASH LED, then without the need to storing any information in information storage module 503;
When apply open detection module 501 detect use the application of FLASH LED to be switched to foreground time, store in information storage module 503 current using this application of FLASH LED application number, the operating time, FLASH LED luminance; And in information storage module 503, delete the information being switched to the application on foreground; Such as, video recording application 300 is switched to foreground, and the current flashlight that is applied as of FLASH LED that using applies 400, then in information storage module 503, store application application number 2, operating time, FLASH LED luminance, in information storage module 503, delete the information of video recording application 300.
In like manner, close detection module 502 when application and detect that the application being positioned at backstage is closed, then in information storage module 503, delete the information of this application; Close detection module 502 when application and detect that the application being positioned at foreground is closed, in information storage module 503, then find out the nearest application message of distance current time, and this application is switched to foreground and control FLASH LED luminance for before the brightness of preserving arrange; Then in information storage module 503, delete the information of this application.
Therefore, adopt the present invention both to meet a mobile terminal manufacturer FLASH LED and realize the control that multiple application uses FLASH LED, also each application of mobile terminal can be made to be unlikely chaotic for the state of a control of FLASH LED, to provide users with the convenient.
Based on above-described embodiment, the present invention also provides a kind of many application based on mobile terminal to use the control system of FLASH LED, as shown in Figure 3, comprising:
Detection module 100 is opened in application, whether is in open mode for detecting in mobile terminal the application using FLASH LED; As detailed above.
First control module 200, for when the first application is in open mode and is using FLASH LED, detect that the second application is opened and needed to switch and use FLASH LED, then control the first application is switched to backstage and preserves the control information operation that the first application uses FLASH LED, and control second and be applied in foreground and use FLASH LED; As detailed above.
Second control module 300, for after foreground is exited in the second application closedown, then find out the control information operation of the first nearest application of distance current time, according to described control information operation, the first application is switched to foreground and uses FLASH LED, and control FLASH LED luminance for before the brightness of preserving arrange; As detailed above.
Further, described many application based on mobile terminal use the control system of FLASH LED, and as shown in Figure 4, described first control module 200 comprises:
First application change detection unit 210, for when the first application is in open mode and is using FLASH LED, detect that the second application is opened and needed to switch and use FLASH LED, store current the first application number applied, current time, the FLASH LED luminance that are using FLASH LED; As detailed above.
First application switch control unit 220, for when detecting that using second of FLASH LED to apply is switched to foreground, controlling second and being applied in foreground use FLASH LED; As detailed above.
Further, described many application based on mobile terminal use the control system of FLASH LED, and as shown in Figure 5, described operation memory module 200 also comprises:
Second application change detection unit 230, for when the second application is in open mode and is using FLASH LED on foreground, detect that the first application needs to switch to foreground and uses FLASH LED, store current the second application number applied, current time, the FLASH LED luminance that are using FLASH LED; As detailed above.
Second application switch control unit 240, for when detecting that using first of FLASH LED to apply is switched to foreground, control first and be applied in foreground use FLASH LED, and control application number, current time, the FLASH LED luminance of deleting the first application stored; As detailed above.
Further, described many application based on mobile terminal use the control system of FLASH LED, and as shown in Figure 6, described operation memory module 200 also comprises:
Control unit 250 is opened in first application, and for using first of FLASH LED the application to be opened when detect in mobile terminal to have, and now mobile terminal does not exist when using the application of FLASH LED to be opened, then do not do any operation; As detailed above.
Control unit 260 is opened in second application, for using second of FLASH LED the application to be opened when detecting in mobile terminal to have, and now mobile terminal exists and is using first of FLASH LED the application when being opened, and stores the current control information operation of the first application to FLASH LED used; As detailed above.
3rd application switch control unit 270, for when detecting in mobile terminal that having second of use FLASH LED to apply is switched to foregrounding state, store the current control information operation of the first application to FLASH LED used, delete the control information operation of the second application being switched to foregrounding simultaneously; As detailed above.
Further, described many application based on mobile terminal use the control system of FLASH LED, and as shown in Figure 7, described second control module 300 also comprises:
First application closing control unit 310, for when detect in mobile terminal have the background application of use FLASH LED to be closed time, delete the control information operation of described background application to FLASH LED; As detailed above.
Second application closing control unit 320, for when detect in mobile terminal have use the foreground application of FLASH LED to be closed time, delete the control information operation of described foreground application to FLASH LED, search the nearest application message of distance current time simultaneously, described application is recently switched to foreground and control FLASH LED luminance for before the brightness of preserving arrange; As detailed above.
Based on above-described embodiment, the present invention also provides a kind of embodiment of mobile terminal, and the mobile terminal described in the present embodiment comprises the control system that the many application based on mobile terminal described above use FLASH LED.
In sum, the many application based on mobile terminal provided by the present invention use control method and the system of FLASH LED, and described method specifically comprises: detect in mobile terminal and use the application of FLASH LED whether to be in open mode; When the first application is in open mode and is using FLASH LED, detect that the second application is opened and needed to switch and use FLASH LED, then control the first application is switched to backstage and preserves the control information operation that the first application uses FLASH LED, and control second and be applied in foreground and use FLASH LED; After foreground is exited in the second application closedown, then find out the control information operation of the first nearest application of distance current time, according to described control information operation, the first application is switched to foreground and uses FLASH LED, and control FLASH LED luminance for before the brightness of preserving arrange.The present invention had both met a mobile terminal manufacturer FLASH LED and had realized the control that multiple application uses FLASH LED, each application of mobile terminal also can be made to be unlikely chaotic for the state of a control of FLASH LED, provide users with the convenient.
Should be understood that; application of the present invention is not limited to above-mentioned citing; for those of ordinary skills; can be improved according to the above description or be converted; such as scope expand to multiple application use same LEDs time; in this case not carrying out restriction to the number of LED can have multiple LED to switch in turn, avoid scope be only limitted to be used in only have a LEDs mobile terminal on, all these improve and conversion all should belong to the protection range of claims of the present invention.