How to dynamically load Android classes

A dynamic loading, Android technology, applied in the direction of program loading/starting, program control devices, etc., can solve problems such as the inability to achieve dynamic loading

Active Publication Date: 2017-04-05
SICHUAN CHANGHONG ELECTRIC CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, in Android's Dalvik virtual machine, this method can only call local static methods, and cannot dynamically load classes as conveniently as in Java.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • How to dynamically load Android classes
  • How to dynamically load Android classes

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0035] In order to better explain and understand the idea of ​​the present invention, this example is further explained in the form of a flow chart.

[0036] This example provides a solution for dynamically loading Android classes, which can dynamically load Dalvik bytecodes containing Android classes, such as figure 1 As shown, it specifically includes the following steps:

[0037] Step 1. Set the dynamic loading entry:

[0038] The program in the Android system is composed of different components, and the system will start the program component only when it needs it, so the dynamic loading must complete the entry setting before the system starts the component, and the application, as the context of the entire application, will be The system calls it at the first time. By modifying the Android configuration file in the Android installation package, the setting of the dynamic loading entry can be realized. For the convenience of description, it is assumed that the loaded Dalv...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to intelligent terminal calculation, and provides a dynamic Android class loading method for solving the problems that in the prior art, in a Dalvik virtual machine of Android, only a local static method can be called, and dynamic class loading cannot be achieved as conveniently as that in Java. The method includes the steps that firstly, a system sets a dynamic loading inlet; secondly, the system configures dynamic loading environment, and dynamic Android class loading is achieved through a Dex class loader in the Android; finally, the system achieves application jump by reading configuration of the dynamic loading inlet and starts class loading by using reflection. Dynamic Android class loading is achieved through the Dex class loader in the Android, dynamic loading of Dalvik bytecodes containing Android classes can be achieved, development of plug-in-type software frameworks is achieved, and therefore the functions such as control customizing, dynamic application loading and even application encryption can be achieved. The method is suitable for dynamic Android class loading.

Description

technical field [0001] The invention relates to intelligent terminal computing, in particular to a method for dynamically loading Android classes. Background technique [0002] Android, (hereinafter referred to as Android) is a free and open source operating system based on Linux. It was originally developed by Andy Rubin and was acquired by Google in August 2005. In November 2007, Google joined forces with software and hardware developers and telecom operators to form the Open Handset Alliance. As of November 2012, Android has occupied 76% of the global smartphone operating market and 90% of the Chinese market. [0003] Android application development is simple and easy to use. In general, its conventional development methods and code structure can meet most development needs. However, in some cases, the development of a plug-in software architecture is required to implement functions such as custom controls, dynamic loading of plug-ins, and even application encryption, s...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/445
Inventor 谭源泉张浩康红娟王艳艳
Owner SICHUAN CHANGHONG ELECTRIC CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products