Summary of the invention
Fundamental purpose of the present invention is to provide a kind of software interactive control method based on the Android platform, the software that is intended to solve Android operating system self has differentiation and not adaptive problem at other display terminals that run on outside non-mobile phone, the flat board, to realize the self-defined of monitoring event and display effect.
In order to realize goal of the invention, the invention provides a kind of software interactive control method based on the Android platform, may further comprise the steps:
Step S01, when listening to trigger event, obtain the interface assembly and the corresponding system bottom data that preset;
Step S02, according to the described interface assembly that presets and corresponding system bottom data, show corresponding interface according to the display logic that sets in advance at top layer;
Step S03, when monitoring external command, response external instruction, and with described instruction writing system bottom, and return execution in step S02.
Preferably, describedly before carrying out described step S01, also comprise:
When step S04, system start, carry out that plug-in unit loads, the initialization of interface assembly, and start the trigger event real-time listening.
Preferably, described trigger event comprises: the data of each the assembly correlation parameter variable that sets in advance or state upgrade.
Preferably, describedly obtain corresponding system bottom data and comprise: the data mode interface that obtains of plug-in unit obtains the system bottom data in the middle of calling.
Preferably, described response external instruction, and described instruction writing system bottom comprised: the data mode interface that arranges of plug-in unit writes to system bottom with the instruction that receives by this interface in the middle of calling.
The present invention also provides a kind of software interactive control system based on the Android platform, comprising:
Monitoring module is used for the real-time listening trigger event; When listening to trigger event, obtain the interface assembly and the corresponding system bottom data that preset.
Processing module according to the described interface assembly that presets and corresponding system bottom data, shows corresponding interface according to the display logic that sets in advance at top layer; When monitoring external command, the response external instruction, and with described instruction writing system bottom, according to the described interface assembly that presets and corresponding system bottom data, show corresponding interface according to the display logic that sets in advance at top layer again.
Preferably, also comprise:
Start module, when being used for system's startup, carry out the initialization of plug-in unit loading, interface assembly, and the startup trigger event is monitored.
Preferably, described trigger event is specially data or the state renewal of each the assembly correlation parameter variable that sets in advance.
Preferably, also comprise:
Middle plug-in unit, this centre plug-in unit comprise and obtain the data mode interface and the data mode interface is set, described obtain the data mode interface for the system bottom data upload to top layer; The described data mode interface that arranges is for the external command writing system bottom with top layer.
The present invention obtains the interface assembly and the corresponding system bottom data that preset, and according to the described interface assembly that presets and corresponding system bottom data, shows corresponding interface according to the display logic that sets in advance at top layer by when listening to trigger event; When monitoring external command, the response external instruction, and with described instruction writing system bottom, according to the described interface assembly that presets and corresponding system bottom data, show corresponding interface according to the display logic that sets in advance at top layer again.The software that the present invention can effectively solve Android operating system self has differentiation and not adaptive problem at other display terminals that run on outside non-mobile phone and the flat board, to realize the self-defined of monitoring event and display effect, is conducive to improve the user and controls experience.
Embodiment
Should be appreciated that specific embodiment described herein only in order to explain the present invention, is not intended to limit the present invention.
With reference to Fig. 1, Fig. 1 is the process flow diagram that the present invention is based on software interactive control system implementation method one embodiment of Android platform.As shown in Figure 1, this flow process may further comprise the steps:
Step S01, when listening to trigger event, obtain the interface assembly and the corresponding system bottom data that preset.In the present embodiment, being embodied as of interface assembly: the unified layout base class of inheriting Android self of each assembly, realizes own layout effect, the interfaces such as reservation demonstration, Refresh Data, logic control, blanking are monitored the operation that correspondence is carried out in each autocorrelative broadcasting.
Step S02, according to the described interface assembly that presets and corresponding system bottom data, show corresponding interface according to the display logic that sets in advance at top layer.In the present embodiment, the interface assembly display mechanism that presets is realized by following method: make the background service program have the pattern style definition that custom dialog box could be controlled and finish to corresponding authority, the dialog box assembly that thus can a kind of pattern style of initialization meets own demand, use this dialog box assembly to load the assembly interface of required demonstration, come again the display position of this custom dialog box of control display by system's window management interface, display size, show level, displaying time and whether can obtain the operation focus (namely whether can input external command).By setting in advance interface assembly, and call corresponding interface assembly when listening to trigger event, thus realized overall any time, arbitrarily all can invocation component under the scene and control its demonstration.For example, the display module of state can be applied to any scene that needs to show current state, as long as monitor the variation of certain state, can call this state interface assembly that presets and show.The for example demonstration of network connection, storage card insertion etc. state.
Step S03, when monitoring external command, response external instruction, and with described instruction writing system bottom, and return execution in step S02.In the present embodiment, in above-mentioned display logic, be provided with the preset time that interface assembly shows, when in preset time, receiving external command, then response external instruction, and with described instruction writing system bottom, according to the described interface assembly that presets and corresponding system bottom data, show corresponding interface according to the display logic that sets in advance at top layer again; Wherein, corresponding system bottom data described herein are with the data behind the instruction writing system bottom.When in preset time, not receiving external command, then this assembly interface blanking.In addition, the mutual realization of external command and system bottom: by by middle Plugin Mechanism, in plug-in unit, realize the interactive interface of top layer and bottom data state, these plug-in units when starting, have been loaded by self-defining background service program, the data mode interface that obtains by middle plug-in unit reads the state that needs or data upload to top layer, will work as front assembly real-time status writing system bottom by the data mode interface is set.
Obtain described in the step S01 corresponding system bottom data be specially call in the middle of the data mode interface that obtains of plug-in unit obtain the system bottom data; The instruction of response external described in the step S03, and with described instruction writing system bottom be specially call in the middle of the data mode interface that arranges of plug-in unit the instruction that receives is write to system bottom by this interface.
In the lump with reference to Fig. 3 a, Fig. 3 b, Fig. 3 c and Fig. 3 d, Fig. 3 a the present invention is based on the acoustic pattern that the software interactive control system of Android platform realizes to switch the effect synoptic diagram; Fig. 3 b the present invention is based on the cloud that the software interactive control system of Android platform realizes to share the effect synoptic diagram; Fig. 3 c the present invention is based on the propelling movement reservation effect synoptic diagram that the software interactive control system of Android platform realizes; Fig. 3 d the present invention is based on the volume effect synoptic diagram that the software interactive control system of Android platform realizes.Above-mentioned according to the described interface assembly that presets and corresponding system bottom data, show corresponding interface according to the display logic that sets in advance at top layer; The display logic of described interface assembly all sets, can be with reference to shown in Fig. 3 a, Fig. 3 b, Fig. 3 c, Fig. 3 d and the following table for the display logic of exercisable interface assembly:
In the lump with reference to Fig. 3 e and Fig. 3 f, Fig. 3 e the present invention is based on the status bar effect synoptic diagram that the software interactive control system of Android platform realizes; Fig. 3 f the present invention is based on the keying panel effect synoptic diagram that the software interactive control system of Android platform realizes.Can be with reference to shown in Fig. 3 e, Fig. 3 f and the following table for the display logic of the display logic of the interface assembly that can not operate:
In addition, should be noted that the processing of button, when accessing the assembly interface, for the assembly with operation focus (getting final product the assembly of input operation instruction), because it is in the superiors of system and can obtains the current operation focus of system, so must carry out the reception work of button, can oneself take over for the button of self-demand and do corresponding logical process, the foreground application before the operation focus is then given during blanking.Need to forward for the button of not processing and to transfer to other and use reception ﹠ disposal, otherwise will stop overall button to play a role, need simultaneously to carry out to return, the reception of the button such as homepage and control the processing of self blanking.
With reference to Fig. 2, Fig. 2 is the process flow diagram that the present invention is based on another embodiment of software interactive control system implementation method of Android platform.As shown in Figure 2, before carrying out described step S01, also comprise:
When step S04, system start, carry out that plug-in unit loads, the initialization of interface assembly, and start the trigger event real-time listening.In the present embodiment, in order to accomplish the standard on the code, and the consistance of a whole set of mechanism of realization all component, realize simultaneously overall situation any time and the shortcut key at interface or the real-time listening of other trigger events, need to start a background service program is moving it always, make the realization of each assembly carry out the unification of initialization flow process, the external interface name of reservation and parameter unified and standard, and all assemblies are realized that class is placed in the independent routine package.When starting, system finishes the drafting of the initialization desired data of all component being finished layout afterwards by the background service program, finish the drafting of finishing layout after the initialization to the desired data of all component by the background service program, the demonstration executable operations is ready to be called.The logic controls such as in addition, the monitoring of all follow-up trigger events, invocation component show, refresh, blanking are responsible for unified the processing by this self-defining background service program.Be conducive to like this realize a whole set of machine-processed consistance of all component.
Data or state that above-mentioned trigger event is specially each assembly correlation parameter variable upgrade.In the present embodiment, the data of described each assembly correlation parameter variable or state upgrade and comprise: push button signalling, system prompt message, network signal and information broadcasting etc.
The present invention obtains the interface assembly and the corresponding system bottom data that preset, and according to the described interface assembly that presets and corresponding system bottom data, shows corresponding interface according to the display logic that sets in advance at top layer by when listening to trigger event; When monitoring external command, the response external instruction, and with described instruction writing system bottom, according to the described interface assembly that presets and corresponding system bottom data, show corresponding interface according to the display logic that sets in advance at top layer again.The software that the present invention can effectively solve Android operating system self has differentiation and not adaptive problem at other display terminals that run on outside non-mobile phone and the flat board, to realize the self-defined of monitoring event and display effect, is conducive to improve the user and controls experience.
With reference to Fig. 4, Fig. 4 is the structural representation that the present invention is based on the software interactive control system embodiment of Android platform.
The present invention also provides a kind of software interactive control system based on the Android platform, comprising:
Monitoring module 100 is used for the real-time listening trigger event; When listening to trigger event, obtain the interface assembly and the corresponding system bottom data that preset.In the present embodiment, being embodied as of interface assembly: the unified layout base class of inheriting Android self of each assembly, realizes own layout effect, the interfaces such as reservation demonstration, Refresh Data, logic control, blanking are monitored the operation that correspondence is carried out in each autocorrelative broadcasting.
Processing module 200 according to the described interface assembly that presets and corresponding system bottom data, shows corresponding interface according to the display logic that sets in advance at top layer; When monitoring external command, the response external instruction, and with described instruction writing system bottom, according to the described interface assembly that presets and corresponding system bottom data, show corresponding interface according to the display logic that sets in advance at top layer again.In the present embodiment, the interface assembly display mechanism that presets is realized by following method: make the background service program have the pattern style definition that custom dialog box could be controlled and finish to corresponding authority, the dialog box assembly that thus can a kind of pattern style of initialization meets own demand, use this dialog box assembly to load the assembly interface of required demonstration, come again the display position of this custom dialog box of control display by system's window management interface, display size, show level, displaying time and whether can obtain the operation focus (namely whether can input external command).By setting in advance interface assembly, and call corresponding interface assembly when listening to trigger event, thus realized overall any time, arbitrarily all can invocation component under the scene and control its demonstration.For example, the display module of state can be applied to any scene that needs to show current state, as long as monitor the variation of certain state, can call this state interface assembly that presets and show.The for example demonstration of network connection, storage card insertion etc. state.
In the present embodiment, in above-mentioned display logic, be provided with the preset time that interface assembly shows, when in preset time, receiving external command, then response external instruction, and with described instruction writing system bottom, according to the described interface assembly that presets and corresponding system bottom data, show corresponding interface according to the display logic that sets in advance at top layer again; Wherein, corresponding system bottom data described herein are with the data behind the instruction writing system bottom.When in preset time, not receiving external command, then this assembly interface blanking.In addition, the mutual realization of external command and system bottom: by by middle Plugin Mechanism, in plug-in unit, realize the interactive interface of top layer and bottom data state, these plug-in units when starting, have been loaded by self-defining background service program, the data mode interface that obtains by middle plug-in unit reads the state that needs or data upload to top layer, will work as front assembly real-time status writing system bottom by the data mode interface is set.
Wherein, described obtain corresponding system bottom data be specially call in the middle of the data mode interface that obtains of plug-in unit obtain the system bottom data; Described response external instruction, and with described instruction writing system bottom be specially call in the middle of the data mode interface that arranges of plug-in unit the instruction that receives is write to system bottom by this interface.
In the lump with reference to Fig. 3 a, Fig. 3 b, Fig. 3 c and Fig. 3 d, Fig. 3 a the present invention is based on the acoustic pattern that the software interactive control system of Android platform realizes to switch the effect synoptic diagram; Fig. 3 b the present invention is based on the cloud that the software interactive control system of Android platform realizes to share the effect synoptic diagram; Fig. 3 c the present invention is based on the propelling movement reservation effect synoptic diagram that the software interactive control system of Android platform realizes; Fig. 3 d the present invention is based on the volume effect synoptic diagram that the software interactive control system of Android platform realizes.Above-mentioned according to the described interface assembly that presets and corresponding system bottom data, show corresponding interface according to the display logic that sets in advance at top layer; The display logic of described interface assembly all sets, can be with reference to shown in Fig. 3 a, Fig. 3 b, Fig. 3 c, Fig. 3 d and the following table for the display logic of exercisable interface assembly:
In the lump with reference to Fig. 3 e and Fig. 3 f, Fig. 3 e the present invention is based on the status bar effect synoptic diagram that the software interactive control system of Android platform realizes; Fig. 3 f the present invention is based on the keying panel effect synoptic diagram that the software interactive control system of Android platform realizes.Can be with reference to shown in Fig. 3 e, Fig. 3 f and the following table for the display logic of the display logic of the interface assembly that can not operate:
In addition, should be noted that the processing of button, when accessing the assembly interface, for the assembly with operation focus (getting final product the assembly of input operation instruction), because it is in the superiors of system and can obtains the current operation focus of system, so must carry out the reception work of button, can oneself take over for the button of self-demand and do corresponding logical process, the foreground application before the operation focus is then given during blanking.Need to forward for the button of not processing and to transfer to other and use reception ﹠ disposal, otherwise will stop overall button to play a role, need simultaneously to carry out to return, the reception of the button such as homepage and control the processing of self blanking.
Described software interactive control system based on the Android platform also comprises:
Start module 300, when being used for system's startup, carry out the initialization of plug-in unit loading, interface assembly, and start the trigger event real-time listening.In the present embodiment, in order to accomplish the standard on the code, and the consistance of a whole set of mechanism of realization all component, realize simultaneously overall situation any time and the shortcut key at interface or the real-time listening of other trigger events, need to start a background service program is moving it always, make the realization of each assembly carry out the unification of initialization flow process, the external interface name of reservation and parameter unified and standard, and all assemblies are realized that class is placed in the independent routine package.When starting, system finishes the drafting of the initialization desired data of all component being finished layout afterwards by the background service program, finish the drafting of finishing layout after the initialization to the desired data of all component by the background service program, the demonstration executable operations is ready to be called.The logic controls such as in addition, the monitoring of all follow-up trigger events, invocation component show, refresh, blanking are responsible for unified the processing by this self-defining background service program.Be conducive to like this realize a whole set of machine-processed consistance of all component.
Data or state that above-mentioned trigger event is specially each assembly correlation parameter variable upgrade.In the present embodiment, the data of described each assembly correlation parameter variable or state upgrade and comprise: push button signalling, system prompt message, network signal and information broadcasting etc.
The software interactive control system based on the Android platform that the present invention proposes efficiently solves the not adaptive problem that the software of Android operating system self occurs running on other display terminals outside non-mobile phone and the flat board, to realize the self-defined of monitoring event and display effect, control experience thereby strengthened the user.
Below only be the preferred embodiments of the present invention; be not so limit claim of the present invention; every equivalent structure or equivalent flow process conversion that utilizes instructions of the present invention and accompanying drawing content to do; or directly or indirectly be used in other relevant technical fields, all in like manner be included in the scope of patent protection of the present invention.