CN108600838B - Information source switching method and device for Android television, Android television and readable storage medium - Google Patents

Information source switching method and device for Android television, Android television and readable storage medium Download PDF

Info

Publication number
CN108600838B
CN108600838B CN201810389161.2A CN201810389161A CN108600838B CN 108600838 B CN108600838 B CN 108600838B CN 201810389161 A CN201810389161 A CN 201810389161A CN 108600838 B CN108600838 B CN 108600838B
Authority
CN
China
Prior art keywords
information source
source switching
android
application program
program
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
CN201810389161.2A
Other languages
Chinese (zh)
Other versions
CN108600838A (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.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology 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 Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN201810389161.2A priority Critical patent/CN108600838B/en
Publication of CN108600838A publication Critical patent/CN108600838A/en
Application granted granted Critical
Publication of CN108600838B publication Critical patent/CN108600838B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/422Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]
    • H04N21/42204User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/4424Monitoring of the internal components or processes of the client device, e.g. CPU or memory load, processing speed, timer, counter or percentage of the hard disk space used

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Stored Programmes (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses an information source switching method and device for an Android television, the Android television and a readable storage medium. According to the method and the device, before the application program corresponding to the program trigger instruction input by a user on the native launcher interface of the Android system is started, callback information fed back to the program trigger instruction by a system layer in the Android system is received, when the fact that the received callback information contains the information source switching instruction is determined, information source switching operation is carried out according to the information source switching instruction, after the information source switching operation is completed, a native interrupt interface in the Android system is called, and then the application program corresponding to the program trigger instruction is started. By switching the information source and then starting the application program, the technical problem that in the prior art, when the Android television performs information source switching operation, the Android television cannot be directly switched to the corresponding information source and enters the selected application program, but flashes the picture of the TV application is effectively solved.

Description

Information source switching method and device for Android television, Android television and readable storage medium
Technical Field
The invention relates to the technical field of smart televisions, in particular to a method and a device for information source switching of an Android television, the Android television and a readable storage medium.
Background
With the rapid development of Android (Android) technology, Android televisions are becoming more and more popular. At present, Android televisions are capable of supporting more and more information sources, and developers package an application program (hereinafter referred to as a TV application) for switching and managing the information sources for the convenience of users. TV applications mainly correspond to live broadcast-type sources such as Digital Television (DTV), Analog Television (ATV), Television signals transmitted over conventional coaxial cable (TV), and sources supporting access to external devices such as High Definition Multimedia Interface (HDMI), Audio (Audio) and Video (Video), free online Flash music Player (CMP), Video Graphics Array (VGA), etc. While other web applications correspond to custom sources (hereinafter storage sources). When the information source is switched, the TV application can be directly used for switching between various information sources and storage information sources corresponding to the TV application.
Although the information source switching is executed by the TV application, which brings convenience to the user, with the continuous update iteration of the Android system version, starting from the Android7.0 version, by adopting the information source switching mode, when the Android TV receives a program trigger instruction input by the user on a native desktop starter (launcher interface) of the Android system, and the TV application performs information source switching operation, the picture of the TV application is flashed firstly in the switching process because of the delay problem existing in the onsop method of the TV application due to the switching of the information source, and then the TV application is switched to the information source selected by the user and enters the corresponding application program.
In addition, since Google does not provide source code of launcher interface native to Android, developers have no way to solve the technical problem by modifying the source code of launcher interface.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a method and a device for switching information sources of an Android television, the Android television and a readable storage medium, and aims to solve the technical problem that in the prior art, when the Android television receives a program trigger instruction input by a user on a native launcher interface of an Android system and performs information source switching operation, the Android television cannot be directly switched to a corresponding information source and enters a selected application program, but flashes a picture of TV application.
In order to achieve the purpose, the invention provides a source switching method of an Android television, which comprises the following steps:
the Android television responds to a program trigger instruction input by a user on a native launcher interface of an Android system, and receives callback information fed back by a system layer in the Android system to the program trigger instruction;
when the callback information contains an information source switching instruction, performing information source switching operation according to the information source switching instruction;
and after the information source switching operation is completed, calling a native interrupt interface in the Android system to start an application program corresponding to the program triggering instruction.
Preferably, when the callback information includes the information source switching instruction, performing information source switching operation according to the information source switching instruction, specifically including:
and when the callback information contains an information source switching instruction, switching the original information source currently used in the Android system to the information source corresponding to the application program according to the information source switching instruction.
Preferably, when the callback information includes a source switching instruction, before switching an original source currently used in the Android system to a source corresponding to the application program according to the source switching instruction, the method further includes:
judging whether the original information source currently used by the Android system is the information source corresponding to the application program;
correspondingly, when the callback information includes a source switching instruction, switching the original source currently used in the Android system to the source corresponding to the application program according to the source switching instruction, and the method includes:
if the original information source currently used by the Android system is judged not to be the information source corresponding to the application program, switching the original information source currently used by the Android system to the information source corresponding to the application program;
and if the original information source currently used by the Android system is judged to be the information source corresponding to the application program, skipping the information source switching operation.
Preferably, after the source switching operation is completed, a native interrupt interface in the Android system is called to start an application program corresponding to the program trigger instruction, and the method further includes:
monitoring whether the application program is in a closed state;
and if the application program is monitored to be in a closed state, calling a native operation interface in the Android system, and switching the information source corresponding to the application program into the original information source.
Preferably, before receiving callback information fed back to the program trigger instruction by the system layer in the Android system, the method further includes:
the Android television initializes the application program corresponding to the program trigger instruction according to the program trigger instruction;
correspondingly, the receiving callback information fed back to the program trigger instruction by the system layer in the Android system, and performing information source switching operation according to the information source switching instruction when the callback information includes the information source switching instruction specifically includes:
and in the operation process of initializing the application program by the Android television, receiving callback information fed back to the program trigger instruction by a system layer in the Android system, and performing information source switching operation according to the information source switching instruction when the callback information contains the information source switching instruction.
Preferably, after the information source switching operation is completed, calling a native interrupt interface in the Android system to start an application program corresponding to the program trigger instruction, specifically including:
and after the information source switching operation and the operation of initializing the application program are completed, calling a native interrupt interface in the Android system to start the application program corresponding to the program triggering instruction.
Preferably, before the Android television responds to a program triggering instruction input by a user on a native launcher interface of an Android system, the method further comprises:
registering a monitoring event;
correspondingly, the receiving callback information fed back to the program trigger instruction by the system layer in the Android system specifically includes:
and receiving callback information when the callback information fed back to the program trigger instruction by the system layer in the Android system is monitored.
In addition, to achieve the above object, the present invention further provides an information source switching device for an Android television, where the device includes:
the response module is used for responding to a program trigger instruction input on a native launcher interface of the Android system by a user;
the receiving module is used for receiving callback information fed back by a system layer in the Android system to the program triggering instruction;
the switching module is used for carrying out information source switching operation according to the information source switching instruction when the callback information comprises the information source switching instruction;
and the starting module is used for calling a native interrupt interface in the Android system after the information source switching operation is finished so as to start the application program corresponding to the program triggering instruction.
In addition, to achieve the above object, the present invention further provides an Android television, including: the information source switching method comprises a memory, a processor and an information source switching program of the Android television, wherein the information source switching program of the Android television is stored in the memory and can run on the processor, and the information source switching program of the Android television is configured to realize the information source switching method of the Android television.
In addition, in order to achieve the above object, the present invention further provides a readable storage medium, where the readable storage medium is a computer readable storage medium, the computer readable storage medium stores an information source switching program of an Android television, and the information source switching program of the Android television, when executed by a processor, implements the steps of the information source switching method of the Android television.
According to the method and the device, before the application program corresponding to the program trigger instruction input by a user on the native launcher interface of the Android system is started, callback information fed back to the program trigger instruction by a system layer in the Android system is received, when the fact that the received callback information contains the information source switching instruction is determined, information source switching operation is carried out according to the information source switching instruction, after the information source switching operation is completed, a native interrupt interface in the Android system is called, and then the application program corresponding to the program trigger instruction is started. By switching the information source and then starting the application program, the technical problem that in the prior art, when the Android television performs information source switching operation, the Android television cannot be directly switched to the corresponding information source and enters the selected application program, but flashes the picture of the TV application is effectively solved.
Drawings
Fig. 1 is a schematic structural diagram of an Android television in a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a first embodiment of an information source switching method for an Android television according to the present invention;
fig. 3 is a schematic flowchart of a source switching method for an Android television according to a second embodiment of the present invention;
fig. 4 is a schematic diagram of functional modules of the information source switching device of the Android television.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an Android television in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the Android television may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display (Display), an input unit such as a Keyboard (Keyboard), a remote controller (telecommuterer), etc., and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as a magnetic disk memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the architecture shown in fig. 1 does not constitute a limitation of the Android television, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a source switching program of an Android television.
In the Android television shown in fig. 1, the network interface 1004 is mainly used for connecting a remote control device for a user to operate, such as a remote controller, a mobile terminal (mobile phone, tablet computer) of the user, and the like, so that the user can interact with the Android television; the user interface 1003 is mainly used for receiving various instructions input by a user through a remote control device, a display screen or a keyboard; the Android television calls a source switching program of the Android television stored in the storage 1005 through the processor 1001, and executes the following operations:
responding to a program trigger instruction input by a user on a native launcher interface of an Android system, and receiving callback information fed back to the program trigger instruction by a system layer in the Android system;
when the callback information contains an information source switching instruction, performing information source switching operation according to the information source switching instruction;
and after the information source switching operation is completed, calling a native interrupt interface in the Android system to start an application program corresponding to the program triggering instruction.
Further, the processor 1001 may call a source switching program of the Android tv stored in the memory 1005, and further perform the following operations:
and when the callback information contains an information source switching instruction, switching the original information source currently used in the Android system to the information source corresponding to the application program according to the information source switching instruction.
Further, the processor 1001 may call a source switching program of the Android tv stored in the memory 1005, and further perform the following operations:
judging whether the original information source currently used by the Android system is the information source corresponding to the application program;
correspondingly, when the callback information includes a source switching instruction, switching the original source currently used in the Android system to the source corresponding to the application program according to the source switching instruction, and the method includes:
if the original information source currently used by the Android system is judged not to be the information source corresponding to the application program, switching the original information source currently used by the Android system to the information source corresponding to the application program;
and if the original information source currently used by the Android system is judged to be the information source corresponding to the application program, skipping the information source switching operation.
Further, the processor 1001 may call a source switching program of the Android tv stored in the memory 1005, and further perform the following operations:
monitoring whether the application program is in a closed state;
and if the application program is monitored to be in a closed state, calling a native operation interface in the Android system, and switching the information source corresponding to the application program into the original information source.
Further, the processor 1001 may call a source switching program of the Android tv stored in the memory 1005, and further perform the following operations:
initializing the application program corresponding to the program trigger instruction according to the program trigger instruction;
correspondingly, the receiving callback information fed back to the program trigger instruction by the system layer in the Android system, and performing information source switching operation according to the information source switching instruction when the callback information includes the information source switching instruction specifically includes:
and in the operation process of initializing the application program, receiving callback information fed back to the program trigger instruction by a system layer in the Android system, and performing information source switching operation according to the information source switching instruction when the callback information contains the information source switching instruction.
Further, the processor 1001 may call a source switching program of the Android tv stored in the memory 1005, and further perform the following operations:
and after the information source switching operation and the operation of initializing the application program are completed, calling a native interrupt interface in the Android system to start the application program corresponding to the program triggering instruction.
Further, the processor 1001 may call a source switching program of the Android tv stored in the memory 1005, and further perform the following operations:
registering a monitoring event;
correspondingly, the receiving callback information fed back to the program trigger instruction by the system layer in the Android system specifically includes:
and receiving callback information when the callback information fed back to the program trigger instruction by the system layer in the Android system is monitored.
According to the scheme, before the application program corresponding to the program trigger instruction input by the user on the native launcher interface of the Android system is started, callback information fed back by a system layer in the Android system to the program trigger instruction is received, when the received callback information is determined to contain the information source switching instruction, information source switching operation is performed according to the information source switching instruction, after the information source switching operation is completed, a native interrupt interface in the Android system is called, and then the application program corresponding to the program trigger instruction is started, so that the technical problem that when the Android television performs the information source switching operation in the prior art, the Android television cannot be directly switched to the corresponding information source, enters the selected application program, and flashes a picture of the TV application is effectively solved.
In addition, it should be noted that, only one specific hardware structure is provided in this embodiment, in practical application, any terminal device that can support the Android system and has multiple information sources may be used as a hardware structure for executing the information source switching program, and those skilled in the art may reasonably select the terminal device according to needs, which is not limited herein.
Based on the hardware structure, the embodiment of the information source switching method of the Android television is provided.
Referring to fig. 2, fig. 2 is a schematic flowchart of a first embodiment of an information source switching method for an Android television according to the present invention.
In a first embodiment, the source switching method for the Android television includes the following steps:
s10: the Android television responds to a program trigger instruction input by a user on a native launcher interface of an Android system, and receives callback information fed back by a system layer in the Android system to the program trigger instruction.
It should be understood that the program trigger instruction input by the user on the native launcher interface of the Android system may be generated by selecting an icon of any application program displayed on the native launcher interface of the Android system through a remote control device in communication connection with the Android television, such as a remote controller or a mobile terminal of the user, a tablet personal computer, and the like, or a mouse, a keyboard, and the like in communication connection with the Android television.
In addition, the communication connection described in the present embodiment may be a wired connection or a wireless connection. The WIreless connection may be WIreless-FIdelity (WI-FI) connection, or may be other WIreless connection methods, for example: bluetooth connection, etc., which is not limited in this embodiment.
In addition, it should be noted that in a specific implementation, a developer needs to compile a native Software Development Kit (SDK) provided by the Android system, so as to implement the following source switching operation.
For ease of understanding, the following detailed description is made:
first, a custom source switching interface needs to be added to the iapplicationthread.
Then, the same self-defined information source switching interface is added in the internal type applicationthread.
In order to facilitate subsequent calling, the self-defined information source switching interfaces added in the above classes can be named as: a scheduleSwitchSourceActivity interface.
Meanwhile, in the instrumentation, java class, an interface is added to control each class to execute the above-mentioned source switching interface, for example, the name is: callactityonswitchsource interface.
In addition, in order to realize automatic source switching, developers need to add a class for switching and managing sources in the native SDK, such as the following classes: java, and simultaneously adding an interface for receiving callback information fed back by each class in the class, and judging whether an interface for performing information source switching operation is needed, for example, the interface is named as: onSwitchSource interface.
After the operation is completed, the existing compiling server is used for compiling the native SDK of the Android system with the newly added interface to obtain the SDK with the information source switching function.
Based on the SDK with the information source switching function, after the Android television responds to a program triggering instruction input by a user on a native launcher interface of an Android system, each class in a system layer of the Android system executes the following operation to generate callback information:
firstly, a newly added schedulewitchsourceactivity interface in the applicationthread.java class is called, callback information whether to perform information source switching is generated after the interface is called, then the generated callback information is sent to the schedulewitchsourceactivity interface in the applicability thread.java class, and after the callback information sent by the schedulewitchsourceactivity interface in the applicability thread.java class is received, the calleactivetuputsource interface in the applicability thread.java class is called.
And finally, reporting callback information fed back by the callActivityOnSwitchSource interface.
It should be noted that, the above is only a specific execution flow, and does not limit the technical scheme of the present invention at all, and in the specific implementation, a person skilled in the art may reasonably set the names and callback logics of each newly added interface as needed, and the present disclosure is not limited herein.
S20: and when the callback information contains an information source switching instruction, performing information source switching operation according to the information source switching instruction.
In this embodiment, when the callback information includes an information source switching instruction, the information source switching operation is performed according to the information source switching instruction, specifically, an original information source currently used in the Android system is switched to an information source corresponding to the application program.
It should be noted that, in this embodiment, the operation of information source switching is specifically executed by a TV application corresponding to tvactivity.
Correspondingly, when the TV application performs the information source switching operation according to the information source switching instruction, the information source corresponding to the TV application is mainly switched to the storage information source, or the storage information source is switched to the information source corresponding to the TV application.
Through the above description, it can be understood that, in a specific implementation, the original source currently used in the Android system may be the source corresponding to the TV application, or may be a storage source. The source corresponding to the application program may be a storage source, or may be a source corresponding to a TV application.
In addition, it should be noted that in a specific implementation, it may be set that, if a boolean value that identifies source switching and is carried in callback information fed back by the call activity on switching source interface is true, if a boolean value that identifies source switching and is carried in the callback information is true, it is determined that the callback information includes a source switching instruction, and if a boolean value that identifies source switching and is carried in the callback information fed back by the call activity on switching source interface is false, if a boolean value that identifies source switching and is carried in the callback information is false, it is determined that the callback information does not include a source switching instruction.
S30: and after the information source switching operation is completed, calling a native interrupt interface in the Android system to start an application program corresponding to the program triggering instruction.
Specifically, in this embodiment, an operation of a native interrupt interface (onStop interface) in the Android system is called, specifically, a tvactivity.
And the operation of starting the application program corresponding to the program triggering instruction is executed by the Activity class corresponding to the selected application program.
It is not difficult to find out through the above description that, in the Android television of this embodiment, before an application program corresponding to a program trigger instruction input by a user on a native launcher interface of an Android system is started, callback information fed back to the program trigger instruction by a system layer in the Android system is received, when it is determined that the received callback information includes a source switching instruction, a source switching operation is performed according to the source switching instruction, after the source switching operation is completed, a native interrupt interface in the Android system is called, and then the application program corresponding to the program trigger instruction is started, so that a technical problem that in the prior art, when the Android television performs the source switching operation, it is not possible to directly switch to a corresponding source, enter the selected application program, but flash a picture of a TV application is effectively solved.
In addition, in order to enable operations of the selected application program and the switching source to be performed synchronously, in this embodiment, before receiving callback information fed back to the program trigger instruction by the system layer in the Android system, the method further includes: and the Android television initializes the application program corresponding to the program trigger instruction according to the program trigger instruction.
That is, after the Android television responds to a program trigger instruction input by a user on a native launcher interface of the Android system, and before callback information fed back to the program trigger instruction by a system layer in the Android system is received, the selected application program starts a lifecycle of an Activity class corresponding to the selected application program, and specifically, the lifecycle may sequentially call an onCreate interface and an onStart interface.
Correspondingly, while the initialization operation is carried out, classes of a scheduleswitch Activity interface and a callactityonswitch Activity interface and an onswitch Activity interface newly added in a tvactivity.java class corresponding to a TV application are added in a system layer of an Android system to execute the operations of the steps S20 to S40, so that the initialization operation of the application program can be synchronously carried out in the process of carrying out the source switching operation, the two operations can be ensured to be basically completed synchronously, and after the source switching operation and the initialization operation of the application program are completed, an onsop interface in the tvactivity.java class is called, the Activity class corresponding to the selected application program can directly enter an onResume method to start the application program, so that the waiting time of a user is greatly reduced, and the user experience is further improved.
In addition, in a specific implementation, in order to reduce occupation of the process of the tvactivity.java class, a monitoring event may be registered in advance to monitor whether callback information fed back to the selected application program by the system layer in the Android system is provided to the onSwitchSource interface in the tvactivity.java class.
Correspondingly, the receiving callback information fed back to the program trigger instruction by the system layer in the Android system specifically includes:
when callback information fed back to the program trigger instruction by a system layer in the Android system is monitored, the callback information is received
It should be noted that, what is given above is only one specific way of receiving callback information, and does not limit the technical solution of the present invention at all, and in practical applications, a person skilled in the art may set a way of receiving callback information according to needs, and does not limit the way here.
Further, referring to fig. 3, a second embodiment of the information source switching method for the Android television is provided based on the first embodiment, in this embodiment, before switching the original information source currently used in the Android system to the information source corresponding to the application program, it is required to first determine whether the original information source currently used in the Android system is the information source corresponding to the application program, and then perform an information source switching operation according to a determination result.
For convenience of explanation, step S20 is subdivided into three sub-steps in the present embodiment, which are detailed in fig. 3.
In step S201, the callback information includes a source switching instruction.
In step S202, it is determined whether the original source currently used by the Android system is a source corresponding to the application.
Correspondingly, if the original information source currently used by the Android system is judged not to be the information source corresponding to the application program, executing step S203, and switching the original information source currently used by the Android system to the information source corresponding to the application program according to the information source switching instruction; and if the original information source currently used by the Android system is judged to be the information source corresponding to the application program, skipping the information source switching operation, and directly entering the step S30.
As can be easily found from the above description, according to the information source switching method for the Android television provided in this embodiment, before switching the currently used original information source in the Android system to the information source corresponding to the application program according to the information source switching instruction, by judging whether the currently used original information source of the Android system is the information source corresponding to the selected application program, only when the currently used original information source of the Android system is not the information source corresponding to the selected application program, the switching operation of the information source is executed, so that the automatic information source switching is realized, the user experience is ensured, the frequency of the information source switching operation is reduced, and the occupation of the working process of the Android system is further reduced.
Further, after the information source switching operation is completed, a native middle section interface in the Android system is called to start an application program corresponding to the program trigger instruction, a new monitoring event can be started, whether the application program is in a closed state or not is monitored, that is, whether the application program calls a native interrupt interface of the Android system and is switched to a background or calls a native destruction interface (an onDestroy interface) of the Android system, and a working process is destroyed by the Android system.
If the application program is monitored to be in a closed state, a native running interface (onResume interface) in the Android system is called, the information source corresponding to the application program is switched to the original information source, user experience is further improved, and the phenomenon that the application program is closed and the corresponding information source still works is avoided.
Specifically, in the Android system, an operation of monitoring whether an application is closed or not may be specifically executed by a monitoring event registered in an Activity class corresponding to the application, and certainly, when the application is monitored to be in a closed state, the operation is also executed by an onsop interface or an endstroy interface in the Activity class corresponding to the application.
And the operation of calling the native running interface in the Android system is to execute an onResume interface in the TVActivity.java class, and simultaneously execute a source switching operation in an onSwitchSource interface newly added in the TVActivity.java class to switch the source corresponding to the application program into the original source.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, details of the technology that are not described in detail in this embodiment may refer to the information source switching method for the Android television provided in the first embodiment of the present invention, and are not described herein again.
In addition, the embodiment of the invention also provides a source switching device of the Android television. As shown in fig. 4, the source switching device of the Android television may include: a response module 4001, a receiving module 4002, a switching module 4003, and an activation module 4004.
The response module 4001 is configured to respond to a program trigger instruction input by a user on a native launcher interface of the Android system. The receiving module 4002 is configured to receive callback information fed back by a system layer in the Android system to the program trigger instruction. The switching module 4003 is configured to perform, when the callback information includes an information source switching instruction, an information source switching operation according to the information source switching instruction. The starting module 4004 is configured to call a native interrupt interface in the Android system after the information source switching operation is completed, so as to start an application program corresponding to the program triggering instruction.
The information source switching device for the Android television, provided by the embodiment, receives callback information fed back by a system layer in the Android system to a program trigger instruction before an application program corresponding to the program trigger instruction input by a user on a native launcher interface of the Android system is started, performs information source switching operation according to the information source switching instruction when the received callback information is determined to include the information source switching instruction, calls a native interrupt interface in the Android system after the information source switching operation is completed, and then starts the application program corresponding to the program trigger instruction, so that the technical problem that in the prior art, when the Android television performs the information source switching operation, the Android television cannot be directly switched to a corresponding information source and enters a selected application program, but flashes a picture of a TV application is effectively solved.
It should be noted that the above-described embodiments of the apparatus are merely illustrative, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of the modules to implement the purpose of the embodiments according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may refer to the information source switching method for the Android television provided in any embodiment of the present invention, and are not described herein again.
In addition, an embodiment of the present invention further provides a readable storage medium, where the readable storage medium is a computer readable storage medium, and an information source switching program of an Android television is stored on the computer readable storage medium, and when executed by a processor, the information source switching program of the Android television implements the following operations:
responding to a program trigger instruction input by a user on a native launcher interface of an Android system, and receiving callback information fed back to the program trigger instruction by a system layer in the Android system;
when the callback information contains an information source switching instruction, performing information source switching operation according to the information source switching instruction;
and after the information source switching operation is completed, calling a native interrupt interface in the Android system to start an application program corresponding to the program triggering instruction.
Further, when being executed by the processor, the source switching program of the Android television further realizes the following operations:
and when the callback information contains an information source switching instruction, switching the original information source currently used in the Android system to the information source corresponding to the application program according to the information source switching instruction.
Further, when being executed by the processor, the source switching program of the Android television further realizes the following operations:
judging whether the original information source currently used by the Android system is the information source corresponding to the application program;
correspondingly, when the callback information includes a source switching instruction, switching the original source currently used in the Android system to the source corresponding to the application program according to the source switching instruction, and the method includes:
if the original information source currently used by the Android system is judged not to be the information source corresponding to the application program, switching the original information source currently used by the Android system to the information source corresponding to the application program;
and if the original information source currently used by the Android system is judged to be the information source corresponding to the application program, skipping the information source switching operation.
Further, when being executed by the processor, the source switching program of the Android television further realizes the following operations:
monitoring whether the application program is in a closed state;
and if the application program is monitored to be in a closed state, calling a native operation interface in the Android system, and switching the information source corresponding to the application program into the original information source.
Further, when being executed by the processor, the source switching program of the Android television further realizes the following operations:
initializing the application program corresponding to the program trigger instruction according to the program trigger instruction;
correspondingly, the receiving callback information fed back to the program trigger instruction by the system layer in the Android system, and performing information source switching operation according to the information source switching instruction when the callback information includes the information source switching instruction specifically includes:
and in the operation process of initializing the application program, receiving callback information fed back to the program trigger instruction by a system layer in the Android system, and performing information source switching operation according to the information source switching instruction when the callback information contains the information source switching instruction.
Further, when being executed by the processor, the source switching program of the Android television further realizes the following operations:
and after the information source switching operation and the operation of initializing the application program are completed, calling a native interrupt interface in the Android system to start the application program corresponding to the program triggering instruction.
Further, when being executed by the processor, the source switching program of the Android television further realizes the following operations:
registering a monitoring event;
correspondingly, the receiving callback information fed back to the program trigger instruction by the system layer in the Android system specifically includes:
and receiving callback information when the callback information fed back to the program trigger instruction by the system layer in the Android system is monitored.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention or a part contributing to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above, and includes several instructions for enabling an Android television, or other terminal devices supporting an Android system, such as a mobile phone, a computer, a server, an air conditioner, or a network device, to execute the method for switching the source of the Android television according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A source switching method of an Android television is characterized by comprising the following steps:
the Android television responds to a program trigger instruction input by a user on a native launcher interface of an Android system, and receives callback information fed back by a system layer in the Android system to the program trigger instruction;
when the callback information contains an information source switching instruction, performing information source switching operation according to the information source switching instruction;
after the information source switching operation is completed, calling a native interrupt interface in the Android system to start an application program corresponding to the program triggering instruction;
after the information source switching operation is completed, calling a native interrupt interface in the Android system to start an application program corresponding to the program trigger instruction, where the method further includes:
monitoring whether the application program is in a closed state;
if the application program is monitored to be in a closed state, calling a native operation interface in the Android system, switching the information source corresponding to the application program into an original information source,
the operation of monitoring whether the application program is in a closed state may be performed by a listening event registered in an Activity class corresponding to the application program, or an onStop interface or an endstroy interface.
2. The method for source switching of an Android television of claim 1, wherein when the callback information includes a source switching instruction, performing a source switching operation according to the source switching instruction, specifically comprising:
and when the callback information contains an information source switching instruction, switching the original information source currently used in the Android system to the information source corresponding to the application program according to the information source switching instruction.
3. The method for switching the information sources of the Android television as claimed in claim 2, wherein when the callback information includes an information source switching instruction, before switching an original information source currently used in the Android system to an information source corresponding to the application program according to the information source switching instruction, the method further comprises:
judging whether the original information source currently used by the Android system is the information source corresponding to the application program;
correspondingly, when the callback information includes a source switching instruction, switching the original source currently used in the Android system to the source corresponding to the application program according to the source switching instruction, and the method includes:
if the original information source currently used by the Android system is judged not to be the information source corresponding to the application program, switching the original information source currently used by the Android system to the information source corresponding to the application program;
and if the original information source currently used by the Android system is judged to be the information source corresponding to the application program, skipping the information source switching operation.
4. The method for source switching of Android television of claim 1, wherein before the receiving of the callback information fed back to the program trigger instruction by the system layer in the Android system, the method further comprises:
the Android television initializes the application program corresponding to the program trigger instruction according to the program trigger instruction;
correspondingly, the receiving callback information fed back to the program trigger instruction by the system layer in the Android system, and performing information source switching operation according to the information source switching instruction when the callback information includes the information source switching instruction specifically includes:
and in the operation process of initializing the application program by the Android television, receiving callback information fed back to the program trigger instruction by a system layer in the Android system, and performing information source switching operation according to the information source switching instruction when the callback information contains the information source switching instruction.
5. The method for source switching of an Android television according to claim 4, wherein after the source switching operation is completed, a native interrupt interface in the Android system is called to start an application program corresponding to the program trigger instruction, and specifically includes:
and after the information source switching operation and the operation of initializing the application program are completed, calling a native interrupt interface in the Android system to start the application program corresponding to the program triggering instruction.
6. The method for source switching of the Android television, as set forth in claim 1, wherein the Android television responds to a program triggering instruction input by a user on a native launcher interface of an Android system, and the method further comprises:
registering a monitoring event;
correspondingly, the receiving callback information fed back to the program trigger instruction by the system layer in the Android system specifically includes:
and receiving callback information when the callback information fed back to the program trigger instruction by the system layer in the Android system is monitored.
7. An information source switching device of an Android television, characterized in that the device further comprises:
the response module is used for responding to a program trigger instruction input on a native launcher interface of the Android system by a user;
the receiving module is used for receiving callback information fed back by a system layer in the Android system to the program triggering instruction;
the switching module is used for carrying out information source switching operation according to the information source switching instruction when the callback information comprises the information source switching instruction;
the starting module is used for calling a native interrupt interface in the Android system after the information source switching operation is finished so as to start an application program corresponding to the program triggering instruction;
after the step of calling a native interrupt interface in the Android system to start an application program corresponding to the program trigger instruction after the information source switching operation is completed, the information source switching device for the Android television further includes:
the application program is used for monitoring whether the application program is in a closed state;
the method is used for calling a native operation interface in the Android system and switching the information source corresponding to the application program into an original information source if the application program is monitored to be in a closed state,
the operation for monitoring whether the application program is in a closed state may be executed by a listening event registered in an Activity class corresponding to the application program, or an onStop interface or an endstroy interface.
8. An Android television, the Android television comprising: the Android television signal source switching method comprises a memory, a processor and an Android television signal source switching program which is stored on the memory and can run on the processor, wherein the Android television signal source switching program is configured to realize the Android television signal source switching method steps of any one of claims 1 to 6.
9. A readable storage medium, characterized in that the readable storage medium is a computer readable storage medium, and the computer readable storage medium stores a source switching program of an Android television, and the source switching program of the Android television, when executed by a processor, implements the steps of the source switching method of the Android television according to any one of claims 1 to 6.
CN201810389161.2A 2018-04-26 2018-04-26 Information source switching method and device for Android television, Android television and readable storage medium Active CN108600838B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810389161.2A CN108600838B (en) 2018-04-26 2018-04-26 Information source switching method and device for Android television, Android television and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810389161.2A CN108600838B (en) 2018-04-26 2018-04-26 Information source switching method and device for Android television, Android television and readable storage medium

Publications (2)

Publication Number Publication Date
CN108600838A CN108600838A (en) 2018-09-28
CN108600838B true CN108600838B (en) 2021-08-03

Family

ID=63609898

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810389161.2A Active CN108600838B (en) 2018-04-26 2018-04-26 Information source switching method and device for Android television, Android television and readable storage medium

Country Status (1)

Country Link
CN (1) CN108600838B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111385618B (en) * 2018-12-29 2022-01-04 深圳Tcl新技术有限公司 Information source list display method, Android television and storage medium
CN109672916B (en) * 2018-12-29 2022-03-11 深圳Tcl新技术有限公司 Information source switching method, television and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103686369A (en) * 2013-12-26 2014-03-26 Tcl集团股份有限公司 Android platform based television signal source switching method and device
CN105025366A (en) * 2014-04-29 2015-11-04 Tcl集团股份有限公司 Source management method and system of smart television
CN105872768A (en) * 2016-04-20 2016-08-17 深圳Tcl数字技术有限公司 Display terminal information source switching method and device
CN106371858A (en) * 2015-07-22 2017-02-01 鸿合科技有限公司 Method and apparatus for starting windows program by android

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9098163B2 (en) * 2012-07-20 2015-08-04 Sony Corporation Internet TV module for enabling presentation and navigation of non-native user interface on TV having native user interface using either TV remote control or module remote control

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103686369A (en) * 2013-12-26 2014-03-26 Tcl集团股份有限公司 Android platform based television signal source switching method and device
CN105025366A (en) * 2014-04-29 2015-11-04 Tcl集团股份有限公司 Source management method and system of smart television
CN106371858A (en) * 2015-07-22 2017-02-01 鸿合科技有限公司 Method and apparatus for starting windows program by android
CN105872768A (en) * 2016-04-20 2016-08-17 深圳Tcl数字技术有限公司 Display terminal information source switching method and device

Also Published As

Publication number Publication date
CN108600838A (en) 2018-09-28

Similar Documents

Publication Publication Date Title
US11706331B2 (en) Information processing method and apparatus, storage medium, and electronic device
WO2017101663A1 (en) Application guiding method and apparatus, and terminal
AU2010327452A1 (en) Mobile device and control method thereof
US9875109B2 (en) Method and apparatus for generating user adaptive application in mobile terminal
CN108549568B (en) Application entry processing method and device, storage medium and electronic equipment
CN111223036B (en) GPU (graphics processing unit) virtualization sharing method and device, electronic equipment and storage medium
CN113992958B (en) Multi-window same-screen interaction method, terminal and storage medium
CN106027631B (en) Data transmission method and device
CN108600838B (en) Information source switching method and device for Android television, Android television and readable storage medium
CN108322834B (en) Television setting method, television and computer readable storage medium
CN110708535A (en) Physical key detection method and device and computer readable storage medium
CN113268286A (en) Application starting method and device, projection equipment and storage medium
CN111209065A (en) Dynamic wallpaper setting method and device, storage medium and electronic equipment
KR20050056270A (en) Creating software applications
CN108153533B (en) Method and device for making installation program, and method and device for installing program
CN103257788A (en) Windows desktop dynamic icon forming method
US20180365199A1 (en) Page display method and device and storage medium
CN110851370B (en) Program testing method and device and storage medium
CN111625221A (en) Version control method, device, equipment and medium applied to integrated development environment
CN105657551A (en) Method and apparatus used by smart television to respond to analog key
CN107589987B (en) Software control method, device and computer readable storage medium
CN112911359B (en) Resource display method, display equipment and remote controller
CN107015874B (en) Data transmission control method, device and terminal
CN105653143B (en) Processing method of application program operation interface and mobile terminal for realizing method
CN114860333A (en) Service arranging method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant