Android TV Hybrid App Development Methodology

By combining Android and web technologies in the Android TV App, the problems of high development difficulty and high cost are solved, and low-cost, high-user experience hybrid App development is achieved, taking into account the advantages of both native Apps and web Apps.

CN115794046BActive Publication Date: 2025-09-12REALTEK SEMICON CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111065683.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-10
Publication Date
2025-09-12
Estimated Expiration
2041-09-10

AI Technical Summary

Technical Problem

Existing Android TV application development has problems such as high development difficulty, high cost and poor user experience. Native apps have stable performance but are difficult to update. Web app development costs are low but have many design restrictions and limited performance.

Method used

Adopting the Android TV hybrid application development method, combining the technologies of Android and web, by generating Android web browsing components, configuring web browsing settings, creating Java objects and JavaScript modules, it realizes information communication and feedback between Android and web, taking into account both the user experience of native App and the low-cost development of web App.

Benefits of technology

It reduces the difficulty and cost of developing Android TV apps, while improving user experience and making function maintenance and expansion easier.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115794046B_ABST
    Figure CN115794046B_ABST
Patent Text Reader

Abstract

A method for developing an Android TV hybrid application includes: generating an Android web browsing component in an Android activity, the Android activity belonging to an Android end of the application; obtaining a web browsing setting subclass, and using the web browsing setting subclass to configure the Android web browsing component; using a web technology to develop a web page interface, which belongs to a web end of the application; using the Android web browsing component to load and display the web page interface; creating a first Java object in the Android end to define communication between the Android end and the web end, and creating a second Java object to implement an interface defined by the first Java object, so that the web end can call the interface using the two Java objects; placing a packaged Java class in the Android end for sending information to the web end, and placing a packaged JavaScript module in the web end for maintaining a listening list to process the information, so that the Android end can feed back the information to the web end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an application development method, and in particular to an Android TV hybrid application development method. Background Art

[0002] As Android TV becomes increasingly popular, the development of Android TV applications (applications; Apps) is also booming.

[0003] The most important components of an app are the user interface (UI) and business logic. The UI is the first intuitive experience an app gives users. If the UI is poor, even if the business logic is excellent, the app will struggle to attract users because users prioritize visuals. On the other hand, if the UI is excellent but the business logic is poor, the subsequent user experience will be affected, making it difficult to retain users.

[0004] Traditional Android TV apps are native apps. These apps are typically written in programming languages ​​(e.g., Java) and offer a good user experience and stable performance. However, they are difficult to develop and update, resulting in high development costs, long development cycles, and high maintenance costs. While web app development technology is currently available, offering low development costs and fast updates, web apps have numerous design restrictions and limited performance, resulting in a poor user experience. Summary of the Invention

[0005] One of the objectives of the present disclosure is to provide a method for developing an Android TV hybrid application (Hybrid App) that takes into account the advantages of both native Apps and web Apps.

[0006] An embodiment of the Android TV hybrid application development method disclosed herein includes the following steps: generating an Android web browsing component in an Android activity, wherein the Android activity belongs to an Android terminal of the Android TV hybrid application; obtaining a web browsing setting subclass and configuring the Android web browsing component using the web browsing setting subclass; developing a web interface of the Android TV hybrid application using a web technology, wherein the web interface belongs to a web terminal of the Android TV hybrid application; loading and displaying the web interface using the Android web browsing component; creating a first Java object in the Android terminal to define at least one communication method between the Android terminal and the web terminal, and creating a second Java object to implement an Android terminal interface defined by the first Java object, thereby enabling the web terminal to call the Android terminal interface using the first Java object and the second Java object; and placing a packaged Java class in the Android terminal for sending information to the web terminal, and placing a packaged JavaScript module in the web terminal for maintaining a listening list to process the information, thereby enabling the Android terminal to feedback the information to the web terminal using the packaged Java class and the packaged JavaScript module.

[0007] The features, implementation and effects of the present invention are described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] [ Figure 1 ] shows an embodiment of the Android TV hybrid application development method disclosed herein;

[0009] [ Figure 2 ]show Figure 1 The framework of the application defined by the development methodology;

[0010] [ Figure 3 ]show Figure 1 The message feedback mechanism of step S160;

[0011] [ Figure 4 ]show Figure 1 An implementation example of step S150; and

[0012] [ Figure 5 ]show Figure 1 An implementation example of step S160. DETAILED DESCRIPTION

[0013] Traditional Android TV applications (apps) are native apps, offering a good user experience and stable performance, but they are difficult to develop and update. Web apps, on the other hand, offer low development costs and fast updates, but they come with numerous design restrictions, limited performance, and a poor user experience. This specification discloses a method for developing hybrid apps for Android TV, leveraging the advantages of both native and web apps.

[0014] The disclosed Android TV hybrid app development method utilizes low-cost and low-difficulty web technology to implement complex user interface (UI) development and display, significantly reducing the overall development difficulty of an Android TV app. Furthermore, the disclosed development method implements the TV app's business logic and data source provision on the Android native system side to ensure a good user experience. Furthermore, the disclosed development method embeds code encapsulation on both the Android and Web sides of the TV app to facilitate maintenance and expansion of app functionality.

[0015] See also Figures 1 to 3 . Figure 1 An embodiment of the disclosed Android TV hybrid App development method is shown, which is used to develop an Android TV hybrid App for execution on an Android TV. Figure 2 show Figure 1 The framework of an application defined by a development methodology. Figure 3 show Figure 1 The message feedback mechanism of step S160. Figure 1 It includes the following steps:

[0016] S110: Generate an Android WebView component in an Android Activity ( Figure 2 : Box 212), wherein the Android activity belongs to an Android side of the Android TV hybrid application ( Figure 2 : Block 210). Android activities and Android web browsing components are known in the art and can be found on the Android developer website at the time of this application. Step S110 is implemented using known / self-developed methods.

[0017] S120: Obtain a WebBrowsing Settings subclass and use it to configure the Android web browsing component. WebBrowsing Settings subclasses are known in the art and can be found on the Android developer website at the time of this application. Step S120 is implemented using known or custom methods.

[0018] S130: Develop a web page interface of the Android TV hybrid application using a web technology ( Figure 2 :222), wherein the web page interface belongs to a web page end of the Android TV hybrid application ( Figure 2 :220). Step S130 is implemented using a known / self-developed method.

[0019] S140: Utilize the Android web browsing component to load and display the web page interface. Step S140 is implemented using a known / self-developed method.

[0020] S150: Create a first Java object in the Android terminal ( Figure 2 :214) to define at least one communication method between the Android terminal and the web terminal, and to create a second Java object ( Figure 2 :216) to implement an Android-side interface defined by the first Java object, thereby utilizing the first Java object and the second Java object to enable the webpage to call the Android-side interface. Creating a Java object is accomplished using known or custom methods; an object is an instance of a class.

[0021] S160: Place a packaged Java class (class) on the Android terminal ( Figure 3 :310) is used to send information to the web page and place a packaged JavaScript module ( Figure 2 :224; Figure 3 :320) is used to maintain a listening list to process the information, thereby utilizing the encapsulated Java class and the encapsulated JavaScript module to allow the Android client to feedback the information to the web client. The above encapsulation is, for example, the encapsulation of a class. Java classes are known in the art and can be found on the Android developer website. JavaScript modules are also known in the art.

[0022] See also Figures 1 to 3 Regarding step S110 , in an implementation example, the method of generating the Android web browsing component is one of the following known methods: generating the Android web browsing component in the Android activity; and adding the Android web browsing component to a layout file of the Android activity.

[0023] See also Figures 1 to 3Regarding step S120, in one implementation example, the steps of configuring the Android web browsing component include: enabling the Android web browsing component to support JavaScript, allowing the JavaScript loaded via a file-based Universal Resource Locator (URL) to read a local file, and allowing the JavaScript loaded via the file URL to access other resources (e.g., resources based on the Hypertext Transfer Protocol (HTTP) or resources based on the Hypertext Transfer Protocol Secure (HTTPS)). The technology of the file URL is well known in the art.

[0024] See also Figures 1 to 3 Regarding step S130 , in one implementation example, the web page technology includes at least one of the following: HyperText Markup Language (HTML); Cascading Style Sheets (CSS); and JavaScript.

[0025] See also Figures 1 to 3 Regarding step S150 , it can be understood that the Web end actively obtains the data required for screen display from the Android end. Figure 4 show Figure 1 An implementation example of step S150 includes the following steps:

[0026] S410: Create the first Java object in the Android terminal ( Figure 2 :214). In this example, the first Java object defines multiple methods ( Figure 2 : Method A, Method B, ...).

[0027] S420: Create the second Java object on the Android terminal ( Figure 2 :216). In this example, the second Java object is used to implement multiple methods of the first Java object ( Figure 2 : Implementation method A, implementation method B, ...).

[0028] S430: Treat the second Java object as a listener and register the listener information in the first Java object.

[0029] S440: Utilize the Android web browsing component to inject (add) the first Java object into a JavaScript context of the web page.

[0030] S450: The encapsulated JavaScript module of the web page side accesses the first Java object of the Android side according to a parameter (eg, name) of the Android web browsing component, and calls the Android side interface.

[0031] S460: Instruct the first Java object to call at least one implementation content (eg, channel information) defined by the second Java object according to the information of the listener.

[0032] See also Figures 1 to 3 Regarding step S160 , it can be understood that the Web end passively learns from the Android end whether there is data / screen that needs to be updated. Figure 5 show Figure 1 An implementation example of step S160 includes the following steps:

[0033] S510: Insert the packaged Java class into the Android terminal ( Figure 3 ∶310), which is used to send information to the web page. In this example, different messages are distinguished by their event identification codes (ID).

[0034] S520: Insert the packaged JavaScript module into the web page. Figure 2 :224; Figure 3 :320), which is used to maintain the listening list to process the information. In this example, the listening list is used by other JavaScript modules to add listening events to the listening list. Each listening event corresponds to an event identifier. In addition, the encapsulated JavaScript module includes a dedicated function corresponding to the encapsulated Java class. This dedicated function is used to receive messages from the Android terminal. Upon receiving a message, it sends the message to a corresponding JavaScript module based on the registration information (e.g., the registration information in step S530).

[0035] S530: Allow a listener on the web page (e.g., another JavaScript module) to create a listening event and register the listening event information (e.g., event identification code) in the encapsulated JavaScript module. For example, before registering the listening event information in the encapsulated JavaScript module, the listener is initialized with an event identification code and a response function corresponding to the event identification code is provided. Figure 3 :330). The content of the response function depends on the implementation requirements. Other listeners on the web page (e.g., other JavaScript modules) can monitor events in the same manner as described above.

[0036] S540: Instruct the Android end to use the packaged Java class to send the information to the web end.

[0037] S550: After the encapsulated JavaScript module on the webpage receives the message, the encapsulated JavaScript module processes the message according to the registration information. For example, if the message corresponds to the event identifier of the listener, the message is allocated to the response function provided by the listener according to the event identifier, so that the response function processes the message.

[0038] Please note that the method disclosed herein focuses on the development process of the Android TV hybrid app, rather than the Android TV hybrid app itself; therefore, the content of the Android TV hybrid app depends on the developer's needs and is beyond the scope of discussion of this disclosure.

[0039] Please also note that, under the premise that implementation is possible, a person skilled in the art may selectively implement some or all of the technical features in any of the aforementioned embodiments, or selectively implement a combination of some or all of the technical features in the aforementioned multiple embodiments, thereby increasing the flexibility of the implementation of the present invention.

[0040] In summary, the Android TV hybrid App development method disclosed in the present invention can take into account the advantages of both native Apps and web Apps.

[0041] Although the embodiments of the present invention are described above, these embodiments are not intended to limit the present invention. A person skilled in the art may modify the technical features of the present invention based on the explicit or implicit contents of the present invention. All such modifications may fall within the scope of the patent protection sought by the present invention. In other words, the scope of patent protection of the present invention shall be determined by the scope of the patent application defined in this specification.

[0042]

Explanation of symbols

[0043] S110~S160: Steps

[0044] 210: Android

[0045] 212: Android web browsing component in Android activity

[0046] 214: First Java Object

[0047] 216: Second Java Object

[0048] 220: Web page

[0049] 222: Web interface

[0050] 224: Encapsulated JavaScript modules

[0051] 310: Encapsulated Java class

[0052] 320: Encapsulated JavaScript modules

[0053] 330: Response function

[0054] S410~S460: Steps

[0055] S510~S550: steps.

Claims

1. A method for developing an Android TV hybrid application for execution on an Android TV, comprising the following steps: generating an Android web browsing component in an Android activity, wherein the Android activity belongs to an Android side of the Android TV hybrid application; Obtain a web browsing setting subclass, and configure the Android web browsing component using the web browsing setting subclass; Developing a web page interface of the Android TV hybrid application using a web page technology, wherein the web page interface belongs to a web page terminal of the Android TV hybrid application; Utilize the Android web browsing component to load and display the web page interface; Creating a first Java object in the Android terminal to define at least one communication method between the Android terminal and the web terminal, and creating a second Java object to implement an Android terminal interface defined by the first Java object, thereby enabling the web terminal to call the Android terminal interface using the first Java object and the second Java object; and A packaged Java class is placed in the Android end for sending information to the web end, and a packaged JavaScript module is placed in the web end for maintaining a listening list to process the information. The packaged Java class and the packaged JavaScript module are used to allow the Android end to feedback the information to the web end.

2. The Android TV hybrid application development method according to claim 1, wherein the method of generating the Android web browsing component comprises one of the following: generating the Android web browsing component in the Android activity; and adding the Android web browsing component to a layout file of the Android activity.

3. The Android TV hybrid application development method according to claim 1, wherein the step of configuring the Android web browsing component includes: enabling the Android web browsing component to support JavaScript, allowing the JavaScript loaded through a universal resource location address opened by a file to read a local file, and allowing the JavaScript loaded through the resource location address to access other resources.

4. The Android TV hybrid application development method according to claim 1, wherein the web page technology comprises at least one of the following: Hypertext Markup Language; Hierarchical Style Sheets; and JavaScript.

5. The Android TV hybrid application development method according to claim 1 , wherein the step of utilizing the first Java object and the second Java object to enable the web page to call the Android interface comprises: Treat the second Java object as a listener and register the listener information in the first Java object; Utilizing the Android web browsing component to inject the first Java object into a JavaScript context on the web page; The encapsulated JavaScript module of the webpage accesses the first Java object of the Android terminal according to a parameter of the Android web browsing component, and calls the Android terminal interface; as well as The first Java object is enabled to call at least one implementation content defined by the second Java object according to the information of the listener.

6. The Android TV hybrid application development method according to claim 1 , wherein the step of utilizing the packaged Java class and the packaged JavaScript module to enable the Android terminal to feed back the information to the web terminal comprises: Allow a listener on the web page to create a listening event and register the listening event information in the encapsulated JavaScript module; Instructing the Android terminal to use the encapsulated Java class to send the information to the web page terminal; and After the packaged JavaScript module on the web page receives the information, the packaged JavaScript module is enabled to distribute the information according to the registration information. 7 . The Android TV hybrid application development method according to claim 6 , wherein the listener is another JavaScript module.

8. The Android TV hybrid application development method according to claim 6, wherein the step of enabling the Android end to feed back the information to the web end further comprises: before registering the information of the listening event in the encapsulated JavaScript module, allowing the listener to initialize an event identification code and provide a response function corresponding to the event identification code.

9. The Android TV hybrid application development method according to claim 8, wherein the step of causing the encapsulated JavaScript module to dispatch the information according to the registration information includes: if the information corresponds to the event identification code, dispatching the information to the response function provided by the listener according to the event identification code, so that the response function processes the information.

Citation Information

Patent Citations

  • Visualized cross-platform mobile application development and generation system

    CN104636139A

  • Cross-platform data processing method and equipment for mobile terminal

    CN110908712A