CN104133664B - A kind of informing generation method and device - Google Patents

A kind of informing generation method and device Download PDF

Info

Publication number
CN104133664B
CN104133664B CN201310455395.XA CN201310455395A CN104133664B CN 104133664 B CN104133664 B CN 104133664B CN 201310455395 A CN201310455395 A CN 201310455395A CN 104133664 B CN104133664 B CN 104133664B
Authority
CN
China
Prior art keywords
unit
plug
informing
file
topology file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310455395.XA
Other languages
Chinese (zh)
Other versions
CN104133664A (en
Inventor
陈悦晖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201310455395.XA priority Critical patent/CN104133664B/en
Publication of CN104133664A publication Critical patent/CN104133664A/en
Application granted granted Critical
Publication of CN104133664B publication Critical patent/CN104133664B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention is applicable to field of terminal technology, provides a kind of informing generation method and device, comprising: in mounted application program, store N number of topology file, and described application program is the host of plug-in unit; Described plug-in unit obtains the ID of M the described topology file generated required for informing; The nest relation of described M described topology file determined by described plug-in unit; Described plug-in unit sends informing to operating system and generates request, generates request generate informing to make operating system according to described informing.In the present invention, the system interface for generating informing provided by the direct call operation system of plug-in unit, and in invoked procedure, the bag name of its host is informed to operating system, to enable operating system directly load topology file from the host of plug-in unit, realize the generation of informing.

Description

A kind of informing generation method and device
Technical field
The invention belongs to field of terminal technology, particularly relate to a kind of informing generation method and device.
Background technology
Android system is the system interface that application program provides for generating informing, application program is specifying the bag name (Packagename) of application program, the ID(Identity of topology file), after the information such as the ID of picture resource, the request generating informing is sent, to generate informing according to request by system in current interface to system.
Except application program itself, the plug-in unit of application program also has the demand generating informing.But, using system interface to generate the mode of informing requires required topology file and picture resource must to be left in the application program that is installed in system, for plug-in unit, due to the file that it is a dynamic load, be not mounted in system, if directly adopt aforesaid way to generate informing, system cannot find and generate topology file needed for informing and picture resource, cause informing to generate.
Summary of the invention
The object of the embodiment of the present invention is to provide a kind of informing generation method and device, and the plug-in unit being intended to solve application program in prior art cannot directly use system interface to generate the problem on communication hurdle.
The embodiment of the present invention is achieved in that a kind of informing generation method, comprising:
In mounted application program, store N number of topology file, described application program is the host of plug-in unit, and described N is positive integer;
Described plug-in unit obtains the ID of M the described topology file generated required for informing, and described M is the positive integer being less than or equal to N;
The nest relation of described M described topology file determined by described plug-in unit;
Described plug-in unit sends informing to operating system and generates request, described informing generates in request and indicates the bag name of described application program, the ID of a described M described topology file and described nest relation, generates request generate informing to make operating system according to described informing.
Another object of the embodiment of the present invention is to provide a kind of informing generating apparatus, comprising:
Storage unit, for storing N number of topology file in mounted application program, described application program is the host of plug-in unit, and described N is positive integer;
Acquiring unit, obtain the ID of M the described topology file generating informing for described plug-in unit, described M is the positive integer being less than or equal to N;
Determining unit, determines the nest relation of described M described topology file for described plug-in unit;
Transmitting element, send informing for described plug-in unit to operating system and generate request, described informing generates in request and indicates the bag name of described application program, the ID of a described M described topology file and described nest relation, generates request generate informing to make operating system according to described informing.
In embodiments of the present invention, data in advance such as generating the topology file that uses required for informing is left in the host of plug-in unit, the system interface for generating informing provided by the direct call operation system of plug-in unit, and in invoked procedure, the bag name of its host is informed to operating system, to enable operating system directly load the data such as the topology file required for generation informing from the host of plug-in unit, realize the generation of informing.
Accompanying drawing explanation
Fig. 1 is the realization flow figure of the informing generation method that the embodiment of the present invention provides;
Fig. 2 is the specific implementation process flow diagram of the informing generation method S102 that the embodiment of the present invention provides;
Fig. 3 is the realization flow figure of the informing generation method that another embodiment of the present invention provides;
Fig. 4 is the specific implementation process flow diagram of the informing generation method S103 that the embodiment of the present invention provides;
Fig. 5 is the informing schematic diagram that the embodiment of the present invention provides;
Fig. 6 is the structured flowchart of the informing generating apparatus that the embodiment of the present invention provides;
Fig. 7 is the block diagram of the part-structure of the mobile phone relevant to the terminal that the embodiment of the present invention provides.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
In embodiments of the present invention, data in advance such as generating the topology file that uses required for informing is left in the host of plug-in unit, the system interface for generating informing provided by the direct call operation system of plug-in unit, and in invoked procedure, the bag name of its host is informed to operating system, to enable operating system directly load the data such as the topology file required for generation informing from the host of plug-in unit, realize the generation of informing.
It should be noted that, the embodiment of the present invention is all for android system, informing generation method and device are described, and the informing generation method that the embodiment of the present invention provides and the applicable system environments of device are not only confined to android system, any terminal (comprising the immobile terminal such as mobile terminal or computing machine) operating system possessing informing generting machanism, as long as informing generation method that the embodiment of the present invention provides and device can be suitable for, identical principle all can be adopted to carry out informing generation, illustrate no longer one by one in subsequent embodiment.
Fig. 1 shows the realization flow of the informing generation method that the embodiment of the present invention provides, and details are as follows:
In S101, in mounted application program, store N number of topology file, described application program is the host of plug-in unit, and described N is positive integer.
The problem of the data left in plug-in unit cannot be used in informing generative process in order to solve android system, in the present embodiment, the various topology files used required for generating in informing process are left in the host of this plug-in unit, and the host of this plug-in unit is necessary for the application program be arranged in android system.In android system during set up applications, android system can be each application assigned file, and with bag this file name by name, then particularly, namely topology file leaves under this file corresponding to the host of plug-in unit.
For topology file, on the one hand, it generally includes the basic layout control of one or more android system, the parameter of these basic layout controls some be cannot arrange in the process generating informing, need to write in advance dead in topology file, but, if desired all possible value of this part parameter exhaustive, and generate different topology files respectively according to different values, so the quantity of topology file can be very many, occupy a large amount of storage spaces; On the other hand, cannot change afterwards because topology file leaves in host, if desired all store corresponding topology file for different informing layouts, so the quantity of topology file also can be very many.Therefore, for the restriction of storage space, as one embodiment of the present of invention, by writing a collection of simple and general topology file, multiple topology files are wherein carried out nested superposition, realizes the parameter of different basic layout controls, or realize new informing layout.
The degree of depth of the nested superposition of topology file can allowed due to general android system is limited, therefore, leave topology file in host in except will considering restriction quantitatively, also need to consider general, that the there is layout hierarchy topology file of a design part itself, such as, nine grids topology file, during to avoid finally generating informing, the required topology file quantity used is too many, the level of nesting is too much.
In the present embodiment, the design of leaving the topology file in host in can be undertaken by the practical experience of developer, is not used in restriction the present invention at this.
In S102, described plug-in unit obtains the ID of M the described topology file generated required for informing, and described M is the positive integer being less than or equal to N.
In the present embodiment, after topology file being left in host, when plug-in unit needs to generate informing, first leaving in the N number of topology file in host M the topology file determined and generate required for informing in, and getting the ID of this M topology file.
Plug-in unit by the mode sent request to host, can get the ID of the topology file generated required for informing.Meanwhile, in order to avoid all sending request to host when needing generation informing at every turn, as one embodiment of the present of invention, as shown in Figure 2, S102 is specially:
In S201, described plug-in unit obtains and encapsulates the ID of described N number of described topology file, generates class.
Namely, the ID(that plug-in unit gets all topology files left in host once comprises the ID of the basic layout control in topology file), these ID are encapsulated in a class, thus, plug-in unit, but can by calling class to get the ID of M the topology file generated required for informing without the need to needing to send request to host when generating informing at every turn.
In S202, described plug-in unit calls described class, imports informing layout parameter into described class.
In the present embodiment, informing layout parameter is for describing the type of the topology file of plug-in unit, owing to encapsulating the ID of multiple topology file in class, when plug-in unit imports informing layout parameter into class in the process calling class, as one of function that class writes in advance, it according to the ID of this informing layout parameter with the topology file of its encapsulation, can determine the topology file type required for plug-in unit.Further, in the present embodiment, conveniently plug-in unit obtains, multiple class can be generated respectively for dissimilar topology file, such as, as shown in table 1, six classes are generated according to the difference of topology file type, wherein, be called the class of RemoteTextView for class, it encapsulates two topology file: remoteview_textview.xml and remoteview_ellipsize_textview.xml, and these two topology files all for showing text in informing, the former can show multirow, and the latter can only show a line.Based on above-mentioned classification, in S102, when plug-in unit needs the topology file used for showing text, only need to call RemoteTextView class, and the parameter of instruction display a line text is imported into RemoteTextView class, then such can return the ID of topology file remoteview_ellipsize_textview.xml automatically to plug-in unit according to this parameter, thereby simplify the execution flow process of S102.
In S203, described class determines the ID of M described topology file required for described generation informing according to described informing layout parameter.
In S204, described plug-in unit receives the ID of described M the described topology file that described class returns.
Thus, by step shown in Fig. 2, namely plug-in unit has got the ID that it generates M topology file required for informing, generates informing request msg thus.
In S103, the nest relation of described M described topology file determined by described plug-in unit.
In the present embodiment, it is all nested against one another for generating the control, picture etc. of specifying in the topology file or topology file used required for an informing, after plug-in unit gets the ID of M the topology file generated required for informing, also need the nest relation determining this M topology file.
Table 1
In the present embodiment, nest relation includes but not limited to the nest relation between topology file and topology file, control specified in topology file, the nest relation between picture and topology file, etc.The nested interface that above-mentioned nest relation can be provided by android system is determined, concrete nest relation determination mode will be described in detail in subsequent embodiment, not repeat them here.
In S104, described plug-in unit sends informing to operating system and generates request, described informing generates in request and indicates the bag name of described application program, the ID of a described M described topology file and described nest relation, generates request generate informing to make operating system according to described informing.
In the present embodiment, the control for generating informing that plug-in unit provides by calling android system, send informing to android system and generate request, except carrying the ID of M the topology file generated required for informing in this request, outside the nest relation determined, also need the bag name of the host carrying this plug-in unit, thus, android system upon receipt of the request, the then direct bag name according to carrying in request, to being mounted to the topology file found in systematic difference program and generate required for informing, and generate informing according to nest relation, android system avoids because can not find topology file thus causes the problem that informing cannot generate.
In embodiments of the present invention, data in advance such as generating the topology file that uses required for informing is left in the host of plug-in unit, the system interface for generating informing provided by the direct call operation system of plug-in unit, and in invoked procedure, the bag name of its host is informed to operating system, to enable operating system directly load the data such as the topology file required for generation informing from the host of plug-in unit, realize the generation of informing.
Informing, except possessing certain layout, usually, also needs to Show Picture in informing.Because picture resource is also kept in plug-in unit, and system directly cannot read picture file from plug-in unit, therefore, in the present embodiment, the mode by arranging URI for the picture resource in plug-in unit makes system find the picture resource being positioned at plug-in unit in the process generating informing.As shown in Figure 3, before S102, the method also comprises:
In S301, in described plug-in unit, generate the data-interface be used for described Application sharing data.
In S302, by described data-interface, generate the universal resource identifier (UniformResourceIdentifier, URI) of picture resource relative to described application program of described plug-in unit.
In the present embodiment, the data-interface of generation is used for externally providing data by plug-in unit, that is, the object beyond plug-in unit also can get the data stored in plug-in unit.For the object of shared data, after generation data-interface, based on this data-interface, can all distribute a URI for the data carrying out sharing, this URI is used for addressing by the object beyond plug-in unit and reads this data.
As one embodiment of the present of invention, above-mentioned data-interface can comprise the ContentProvider in android system, it provides unified interface for storing and obtain data, thus other application program can be allowed to preserve or the various data types that read in this ContentProvider.Particularly, the ContentProvider generated in the host of plug-in unit, remembers that it is " host ", then the system ContentProvider that this host can be found to generate by the URI started with " content: //host ", gets data wherein; And the ContentProvider that plug-in unit generates is designated as " plugin ", but because plug-in unit is not installed in system, the ContentProvider that system cannot directly find plug-in unit to generate, therefore, the ContentProvider that plug-in unit generates is registered in " host ", then data wherein all can be assigned to a URI started with " content: //host/plugin ", make system can get data in plug-in unit.
In the present embodiment, the data-interface generated in S301 includes but not limited to the data-interface generated based on ContentProvider, and except usage data interface come for data distribute relative to except the URI of application program, the mode can also transmitting bitmap, to reach the same effect externally providing data, does not limit one by one at this.
In topology file, the spacing can coming in specified notification hurdle between control and control by parameters such as android:paddingTop, but for the restriction of storage space, a topology file cannot be all stored for each spacing in host, therefore, as one embodiment of the present of invention, storage distance topology file in host, in pitch layout's file, be provided with multiple different in width, horizontal distribution or vertical distribution, then plug-in unit described in S103 determines that the nest relation of described M described topology file is specially:
One or more viewing area arranged in multiple described viewing area is visible, is set to put continuously in visible described viewing area.
Such as, be provided with in pitch layout's file width be respectively 1,2,4,5,10,20,40,80,160 pixels, the viewing area of horizontal distribution, if need a width to be the region of 8 in informing between control and control, then arrange width be 1,2,5 region be visible, other regions are invisible, and visible viewing area will be set to put continuously in the horizontal direction, then obtain the region that width is 8.
In the present embodiment, when being encapsulated by the ID of class to topology file, parameter " 8 " can be imported into directly to the class at this pitch layout's file place, then such can Lookup protocol width be 1,2,5 region visible, other regions are invisible, and put continuously in the horizontal direction visible viewing area.
In the present embodiment, due to concerning different terminals, its display resolution is different, when needs Show Picture in informing, by the situation that the mode of URI is exaggerated for picture when finally showing then may appear in topology file designated pictures or reduces, therefore, as one embodiment of the present of invention, the problems referred to above can be solved by design relative placement file.
In the present embodiment, relative placement's file has three overlapped levels: top layer, middle level and bottom, then S103 is as shown in Figure 4, specifically comprises:
S401, by nested for the described pitch layout file bottom to described relative placement file, to determine the size of described relative placement file.
In the present embodiment, utilize a certain size the method for viewing area of pitch layout's file generated according to above-mentioned, by by nested for the pitch layout's file bottom to relative placement's file, specify the size in territory, relative placement document display area.
S402, the described URI of the picture resource of described plug-in unit is specified in the middle level for described relative placement file.
In the present embodiment, after determining the size in territory, relative placement document display area, the URI of the picture resource of the plug-in unit needing display is specified in middle level for relative placement's file, due in relative placement's file, the viewing area size defining its middle level equals the viewing area size of its bottom, therefore, through step shown in Fig. 4, make picture can be filled in the viewing area of relative placement's file, can realize thus showing the appointment size of picture on informing.
As another embodiment of the present invention, in order to avoid the situation that picture when occurring finally showing is exaggerated or reduces, the problems referred to above can also be solved by linear placement, wherein, linear placement's file produces the state of transverse direction or vertical linear distribution for each topology file of making it nested or layout control, picture.In the present embodiment, the URI of a width or several pictures can be specified for linear placement's file, in linear topology file, set the interval between picture and picture simultaneously, by the URI for the space designated pictures between two intervals, in the space that picture can be filled between these two intervals, with this, display of appointment size is achieved to picture.
Next, for the informing shown in Fig. 5, set forth the idiographic flow that its nest relation is determined:
As shown in Figure 5, informing shows horizontal linear placement on the whole, Shows Picture 1 from left to right successively, word 1 and word 2, picture 2, then S102 and S103 is specific as follows:
1, plug-in unit is by calling RemoteLinearlayoutParams class, gets the ID of horizontal linear topology file, and is designated as root;
2, plug-in unit is by calling RemoteRelativeImageView class, gets the ID of relative placement's file, is designated as IA, and the URI of designated pictures 1;
3, the nested IA of root;
4, plug-in unit is by calling RemoteLinearlayoutParams class, gets longitudinal linear placement ID, is designated as mid;
5, plug-in unit is by calling RemoteTextView class, gets the ID of the topology file of single display word, is designated as TA, and arrange word 1;
6, the nested TA of mid;
7, plug-in unit is by calling RemoteTextView class, gets the ID of the topology file of single display word, is designated as TB, and arrange word 2;
8, the nested TB of mid;
9, the nested mid of root;
10, plug-in unit is by calling RemoteRelativeImageView class, gets the ID of relative placement's file, is designated as IB, and the URI of designated pictures 2;
11, the nested IB of root;
12, above-mentioned nest relation is sent to system in informing generation request.
Thus, after system gets topology file in the application, informing can be generated according to above-mentioned nest relation.
Fig. 6 shows the informing generating apparatus that the embodiment of the present invention provides, and this device can be arranged in the mobile terminal such as mobile phone, flat board, for running the informing generation method described in Fig. 1 to Fig. 5 embodiment of the present invention.For convenience of explanation, illustrate only part related to the present embodiment.
With reference to Fig. 6, this device comprises:
Storage unit 61, stores N number of topology file in mounted application program, and described application program is the host of plug-in unit, and described N is positive integer.
Acquiring unit 62, described plug-in unit obtains the ID of M the described topology file generated required for informing, and described M is the positive integer being less than or equal to N.
Determining unit 63, the nest relation of described M described topology file determined by described plug-in unit.
Transmitting element 64, described plug-in unit sends informing to operating system and generates request, described informing generates in request and indicates the bag name of described application program, the ID of a described M described topology file and described nest relation, generates request generate informing to make operating system according to described informing.
Alternatively, described device also comprises:
First generation unit, generates the data-interface be used for described Application sharing data in described plug-in unit.
Second generation unit, by described data-interface, generates the URI of picture resource relative to described application program of described plug-in unit.
Then described determining unit 63 specifically for:
For one or more in this M described topology file specifies the described URI of the picture resource of described plug-in unit.
Alternatively, described first generation unit comprises:
First generates subelement, in described plug-in unit, generate ContentProvider.
Registration subelement, is registered to the ContentProvider of described plug-in unit in the ContentProvider of described application program.
Alternatively, described M described topology file comprises pitch layout's file, be provided with in described pitch layout file multiple different in width, the viewing area of horizontal distribution or vertical distribution,
Then described determining unit 63 specifically for:
One or more viewing area arranged in multiple described viewing area is visible, and is set to put continuously in visible described viewing area.
Alternatively, described M described topology file comprises relative placement's file, and described relative placement file comprises middle level and bottom,
Then described determining unit 63 also comprises:
Nested subelement, by nested for the described pitch layout file bottom to described relative placement file, to determine the size of described relative placement file.
Specify subelement, the described URI of the picture resource of described plug-in unit is specified in the middle level for described relative placement file.
Alternatively, described acquiring unit 62 comprises:
Second generates subelement, and described plug-in unit obtains and encapsulates the ID of described N number of described topology file, generates class.
Call subelement, described plug-in unit calls described class, imports informing layout parameter into described class.
Determine subelement, described class determines the ID of M described topology file required for described generation informing according to described informing layout parameter.
Receive subelement, described plug-in unit receives the ID of described M the described topology file that described class returns.
Shown in Fig. 7 is the block diagram of the part-structure of the mobile phone relevant to the terminal that the embodiment of the present invention provides.With reference to figure 7, mobile phone comprises: the parts such as radio frequency (RadioFrequency, RF) circuit 710, storer 720, input block 730, display unit 740, sensor 750, voicefrequency circuit 760, wireless module 770, processor 780 and power supply 790.It will be understood by those skilled in the art that the handset structure shown in Fig. 7 does not form the restriction to mobile phone, the parts more more or less than diagram can be comprised, or combine some parts, or different parts are arranged.
Concrete introduction is carried out below in conjunction with Fig. 7 each component parts to mobile phone:
RF circuit 710 can be used for receiving and sending messages or in communication process, the reception of signal and transmission, especially, after being received by the downlink information of base station, process to processor 780; In addition, the up data of design are sent to base station.Usually, RF circuit includes but not limited to antenna, at least one amplifier, transceiver, coupling mechanism, low noise amplifier (LowNoiseAmplifier, LNA), diplexer etc.In addition, RF circuit 710 can also by radio communication and network and other devices communicatings.Above-mentioned radio communication can use arbitrary communication standard or agreement, include but not limited to global system for mobile communications (GlobalSystemofMobilecommunication, GSM), general packet radio service (GeneralPacketRadioService, GPRS), CDMA (CodeDivisionMultipleAccess, CDMA), Wideband Code Division Multiple Access (WCDMA) (WidebandCodeDivisionMultipleAccess, WCDMA), Long Term Evolution (LongTermEvolution, LTE)), Email, Short Message Service (ShortMessagingService, SMS) etc.
Storer 720 can be used for storing software program and module, and processor 780 is stored in software program and the module of storer 720 by running, thus performs various function application and the data processing of mobile phone.Storer 720 mainly can comprise storage program district and store data field, and wherein, storage program district can store operating system, application program (such as sound-playing function, image player function etc.) etc. needed at least one function; Store data field and can store the data (such as voice data, phone directory etc.) etc. created according to the use of mobile phone.In addition, storer 720 can comprise high-speed random access memory, can also comprise nonvolatile memory, such as at least one disk memory, flush memory device or other volatile solid-state parts.
Input block 730 can be used for the numeral or the character information that receive input, and generation arranges with the user of mobile phone 700 and function controls the input of relevant key signals.Particularly, input block 730 can comprise contact panel 731 and other input equipments 732.Contact panel 731, also referred to as touch-screen, user can be collected or neighbouring touch operation (such as user uses any applicable object or the operations of annex on contact panel 731 or near contact panel 731 such as finger, stylus) thereon, and drive corresponding coupling arrangement according to the formula preset.Optionally, contact panel 731 can comprise touch detecting apparatus and touch controller two parts.Wherein, touch detecting apparatus detects the touch orientation of user, and detects the signal that touch operation brings, and sends signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and converts it to contact coordinate, then gives processor 780, and the order that energy receiving processor 780 is sent also is performed.In addition, the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave can be adopted to realize contact panel 731.Except contact panel 731, input block 730 can also comprise other input equipments 732.Particularly, other input equipments 732 can include but not limited to one or more in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, control lever etc.
Display unit 740 can be used for the various menus showing information or the information being supplied to user and the mobile phone inputted by user.Display unit 740 can comprise display panel 741, optionally, the form such as liquid crystal display (LiquidCrystalDisplay, LCD), Organic Light Emitting Diode (OrganicLight-EmittingDiode, OLED) can be adopted to configure display panel 741.Further, contact panel 731 can cover display panel 741, when contact panel 731 detects thereon or after neighbouring touch operation, send processor 780 to determine the type of touch event, on display panel 741, provide corresponding vision to export with preprocessor 780 according to the type of touch event.Although in the figure 7, contact panel 731 and display panel 741 be as two independently parts to realize input and the input function of mobile phone, but in certain embodiments, can by integrated to contact panel 731 and display panel 741 and realize the input and output function of mobile phone.
Mobile phone 700 also can comprise at least one sensor 750, such as optical sensor, motion sensor and other sensors.Particularly, optical sensor can comprise ambient light sensor and proximity transducer, and wherein, ambient light sensor the light and shade of environmentally light can regulate the brightness of display panel 741, proximity transducer when mobile phone moves in one's ear, can cut out display panel 741 and/or backlight.As the one of motion sensor; accelerometer sensor can detect the size of all directions (are generally three axles) acceleration; size and the direction of gravity can be detected time static, can be used for identifying the application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating) of mobile phone attitude, Vibration identification correlation function (such as passometer, knock) etc.; As for mobile phone also other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared ray sensor, do not repeat them here.
Voicefrequency circuit 760, loudspeaker 761, microphone 762 can provide the audio interface between user and mobile phone.Voicefrequency circuit 760 can by receive voice data conversion after electric signal, be transferred to loudspeaker 761, by loudspeaker 761 be converted to voice signal export; On the other hand, the voice signal of collection is converted to electric signal by microphone 762, voice data is converted to after being received by voicefrequency circuit 760, after again voice data output processor 780 being processed, through RF circuit 710 to send to such as another mobile phone, or export voice data to storer 720 to process further.
Wireless module is based on short range wireless transmission technology, and mobile phone can help user to send and receive e-mail by wireless module 770, browse webpage and access streaming video etc., and its broadband internet wireless for user provides is accessed.Although Fig. 7 shows wireless module 770, be understandable that, it does not belong to must forming of mobile phone 700, can omit in the scope of essence not changing invention as required completely.
Processor 780 is control centers of mobile phone, utilize the various piece of various interface and the whole mobile phone of connection, software program in storer 720 and/or module is stored in by running or performing, and call the data be stored in storer 720, perform various function and the process data of mobile phone, thus integral monitoring is carried out to mobile phone.Optionally, processor 780 can comprise one or more processing unit; Preferably, processor 780 accessible site application processor and modem processor, wherein, application processor mainly processes operating system, user interface and application program etc., and modem processor mainly processes radio communication.Be understandable that, above-mentioned modem processor also can not be integrated in processor 780.
Mobile phone 700 also comprises the power supply 790(such as battery of powering to all parts), preferably, power supply can be connected with processor 780 logic by power-supply management system, thus realizes the functions such as management charging, electric discharge and power managed by power-supply management system.
Although not shown, mobile phone 700 can also comprise camera, bluetooth module etc., does not repeat them here.
In embodiments of the present invention, the processor 780 included by this terminal also has following functions: informing generation method, comprising:
In mounted application program, store N number of topology file, described application program is the host of plug-in unit, and described N is positive integer;
Described plug-in unit obtains the ID of M the described topology file generated required for informing, and described M is the positive integer being less than or equal to N;
The nest relation of described M described topology file determined by described plug-in unit;
Described plug-in unit sends informing to operating system and generates request, described informing generates in request and indicates the bag name of described application program, the ID of a described M described topology file and described nest relation, generates request generate informing to make operating system according to described informing.
Further, the information source of described incoming information classification is calling terminal, and the described described incoming information classification according to arranging generates caller identification message and comprises:
Obtain the incoming information that described incoming information classification is corresponding;
Generate the caller identification message including the described incoming information got.
Further, before described plug-in unit sends informing generation request to operating system, described method also comprises:
The data-interface be used for described Application sharing data is generated in described plug-in unit;
By described data-interface, generate the universal resource identifier URI of picture resource relative to described application program of described plug-in unit;
Then described plug-in unit determines that the nest relation of described M described topology file comprises:
For one or more in this M described topology file specifies the described URI of the picture resource of described plug-in unit.
Further, described generation in described plug-in unit is used for comprising with the data-interface of described Application sharing data:
ContentProvider is generated in described plug-in unit;
The ContentProvider of described plug-in unit is registered in the ContentProvider of described application program.
Further, described M described topology file comprises pitch layout's file, be provided with in described pitch layout file multiple different in width, the viewing area of horizontal distribution or vertical distribution,
Then described plug-in unit determines that the nest relation of described M described topology file is specially:
One or more viewing area arranged in multiple described viewing area is visible, and is set to put continuously in visible described viewing area.
Further, described M described topology file comprises relative placement's file, and described relative placement file comprises overlapped top layer, middle level and bottom,
Then described plug-in unit determines that the nest relation of described M described topology file also comprises:
By nested for the described pitch layout file bottom to described relative placement file, to determine the size of described relative placement file;
The described URI of the picture resource of described plug-in unit is specified in middle level for described relative placement file.
Further, the ID of M the described topology file of described plug-in unit acquisition generation required for informing comprises:
Described plug-in unit obtains and encapsulates the ID of described N number of described topology file, generates class;
Described plug-in unit calls described class, imports informing layout parameter into described class;
Described class determines the ID of M described topology file required for described generation informing according to described informing layout parameter;
Described plug-in unit receives the ID of described M the described topology file that described class returns.
In embodiments of the present invention, data in advance such as generating the topology file that uses required for informing is left in the host of plug-in unit, the system interface for generating informing provided by the direct call operation system of plug-in unit, and in invoked procedure, the bag name of its host is informed to operating system, to enable operating system directly load the data such as the topology file required for generation informing from the host of plug-in unit, realize the generation of informing.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. an informing generation method, is characterized in that, comprising:
In mounted application program, store N number of topology file, described application program is the host of plug-in unit, and described N is positive integer;
Described plug-in unit obtains the ID of M the described topology file generated required for informing, and described M is the positive integer being less than or equal to N;
The nest relation of described M described topology file determined by described plug-in unit;
Described plug-in unit sends informing to operating system and generates request, described informing generates in request and indicates the bag name of described application program, the ID of a described M described topology file and described nest relation, generates request generate informing to make operating system according to described informing;
Before described plug-in unit sends informing generation request to operating system, described method also comprises:
The data-interface be used for described Application sharing data is generated in described plug-in unit;
By described data-interface, generate the universal resource identifier URI of picture resource relative to described application program of described plug-in unit;
Wherein, described plug-in unit determines that the nest relation of described M described topology file comprises:
For one or more in this M described topology file specifies the described URI of the picture resource of described plug-in unit.
2. the method for claim 1, is characterized in that, described generation in described plug-in unit is used for comprising with the data-interface of described Application sharing data:
ContentProvider is generated in described plug-in unit;
The ContentProvider of described plug-in unit is registered in the ContentProvider of described application program.
3. the method for claim 1, is characterized in that, described M described topology file comprises pitch layout's file, be provided with in described pitch layout file multiple different in width, the viewing area of horizontal distribution or vertical distribution,
Wherein, described plug-in unit determines that the nest relation of described M described topology file is specially:
One or more viewing area arranged in multiple described viewing area is visible, and is set to put continuously in visible described viewing area.
4. method as claimed in claim 3, is characterized in that, described M described topology file comprises relative placement's file, and described relative placement file comprises overlapped top layer, middle level and bottom,
Wherein, described plug-in unit determines that the nest relation of described M described topology file also comprises:
By nested for the described pitch layout file bottom to described relative placement file, to determine the size of described relative placement file;
The described URI of the picture resource of described plug-in unit is specified in middle level for described relative placement file.
5. the method as described in any one of claim 1-4, is characterized in that, the ID that described plug-in unit obtains M the described topology file generated required for informing comprises:
Described plug-in unit obtains and encapsulates the ID of described N number of described topology file, generates class;
Described plug-in unit calls described class, imports informing layout parameter into described class;
Described class determines the ID of M described topology file required for described generation informing according to described informing layout parameter;
Described plug-in unit receives the ID of described M the described topology file that described class returns.
6. an informing generating apparatus, is characterized in that, comprising:
Storage unit, for storing N number of topology file in mounted application program, described application program is the host of plug-in unit, and described N is positive integer;
Acquiring unit, obtain the ID of M the described topology file generating informing for described plug-in unit, described M is the positive integer being less than or equal to N;
Determining unit, determines the nest relation of described M described topology file for described plug-in unit;
Transmitting element, send informing for described plug-in unit to operating system and generate request, described informing generates in request and indicates the bag name of described application program, the ID of a described M described topology file and described nest relation, generates request generate informing to make operating system according to described informing;
Described device also comprises:
First generation unit, for generating the data-interface be used for described Application sharing data in described plug-in unit;
Second generation unit, for by described data-interface, generates the universal resource identifier URI of picture resource relative to described application program of described plug-in unit;
Wherein, described determining unit specifically for:
For one or more in this M described topology file specifies the described URI of the picture resource of described plug-in unit.
7. device as claimed in claim 6, it is characterized in that, described first generation unit comprises:
First generates subelement, for generating ContentProvider in described plug-in unit;
Registration subelement, for being registered to the ContentProvider of described plug-in unit in the ContentProvider of described application program.
8. device as claimed in claim 6, is characterized in that, described M described topology file comprises pitch layout's file, be provided with in described pitch layout file multiple different in width, the viewing area of horizontal distribution or vertical distribution,
Wherein, described determining unit specifically for:
One or more viewing area arranged in multiple described viewing area is visible, and is set to put continuously in visible described viewing area.
9. device as claimed in claim 8, is characterized in that, described M described topology file comprises relative placement's file, and described relative placement file comprises overlapped top layer, middle level and bottom,
Wherein, described determining unit also comprises:
Nested subelement, for by nested for the described pitch layout file bottom to described relative placement file, to determine the size of described relative placement file;
Specify subelement, for specifying the described URI of the picture resource of described plug-in unit for the middle level of described relative placement file.
10. the device as described in any one of claim 6-9, is characterized in that, described acquiring unit comprises:
Second generates subelement, obtains and encapsulate the ID of described N number of described topology file for described plug-in unit, generation class;
Call subelement, call described class for described plug-in unit, import informing layout parameter into described class;
Determine subelement, determine the ID of M described topology file of described generation informing for described class according to described informing layout parameter;
Receive subelement, receive the ID of described M the described topology file that described class returns for described plug-in unit.
CN201310455395.XA 2013-09-29 2013-09-29 A kind of informing generation method and device Active CN104133664B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310455395.XA CN104133664B (en) 2013-09-29 2013-09-29 A kind of informing generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310455395.XA CN104133664B (en) 2013-09-29 2013-09-29 A kind of informing generation method and device

Publications (2)

Publication Number Publication Date
CN104133664A CN104133664A (en) 2014-11-05
CN104133664B true CN104133664B (en) 2016-03-02

Family

ID=51806352

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310455395.XA Active CN104133664B (en) 2013-09-29 2013-09-29 A kind of informing generation method and device

Country Status (1)

Country Link
CN (1) CN104133664B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106897057B (en) * 2017-01-20 2020-10-16 北京奇虎科技有限公司 Method and device for calling notification bar by plug-in
CN106909376B (en) * 2017-02-17 2021-08-24 北京小米移动软件有限公司 Notification bar display method and device
CN108845842A (en) * 2018-04-18 2018-11-20 北京奇虎科技有限公司 It is multiplexed the method and device of view

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064732A (en) * 2013-01-05 2013-04-24 乐视致新电子科技(天津)有限公司 Method for taking over third-party application messages through message manager
CN103218115B (en) * 2013-03-06 2016-09-28 广东欧珀移动通信有限公司 The optimization display packing of a kind of informing and mobile terminal

Also Published As

Publication number Publication date
CN104133664A (en) 2014-11-05

Similar Documents

Publication Publication Date Title
CN103327189B (en) Method and device for uploading, browsing and deleting pictures
CN103473092B (en) A kind of download the processing method of application, device and terminal unit
CN104123120B (en) A kind of browser page data filtering method, device and system
CN103854298A (en) Method for integrating pictures with two-dimension codes and terminal
CN104426962A (en) Multi-terminal binding method, binding server, terminal and multi-terminal binding system
CN105022616A (en) Method and device for generating web page
CN104618217A (en) Method, terminal, server and system for sharing resource
CN104519197A (en) User login method, user login device and terminal devices
CN105094809A (en) Combined picture layout modification method and device and terminal equipment
CN103390034A (en) Image display method, device, terminal and server
CN103853819A (en) Information acquisition method, terminal and system
CN104239332A (en) Webpage content processing method, webpage content processing device and browser client side
CN104751410A (en) Image and two-dimensional code fusion method and device
CN104967608A (en) Method of playing multimedia file, mobile terminal and fixing terminal
CN104869465A (en) Video playing control method and device
CN103177217B (en) A kind of file scanning method, system and client and server
CN104954159A (en) Network information statistics method and device
CN104965642A (en) Method and apparatus for generating a drop-down list
CN104021129A (en) Picture group display method and terminal
CN103607431B (en) Mobile terminal resource processing method, device and equipment
CN103634463B (en) The reminding method of state variation and terminal
CN105608124A (en) Screen capturing method and apparatus
CN105630517A (en) Configuration information setting method, configuration information setting device and communication system
CN104598542A (en) Display method and device for multimedia information
CN103631592B (en) A kind of configuration, call method, device and equipment that shows resource

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant