Introduction to Android Intro

Source: Internet
Author: User

Introduction to Android Intro
  1. 3G, 4G

    • Third generation mobile communication technology (3rd-generation), the rate is generally hundreds of kbps, compared to the previous 2G and 2.5G in the data transmission speed is greatly improved.
    • The fourth generation of mobile communication technology (4th-generation), the speed can reach more than 100Mbps, almost meet the needs of all people to transmit data.

    The current mainstream 3G technical standards have three kinds:

    • WCDMA: More than 80% of the global 3G network is the use of this format. China Unicom operates. 186
    • CDMA2000: At present, Japan and South Korea and North America use more. China Telecom operations. 189
    • TD-SCDMA: China's independent intellectual property rights 3G communication technology. China Mobile operations. 188

    The current mainstream 4G technology is LTE, but has not been widely used:
    Gsm→gprs→edge→wcdma→hsdpa→hsdpa+→lte

  2. What is Android

    1. Software stack memory for mobile devices, including

      • A complete operating system
      • Middleware
      • Critical applications
    2. The bottom layer is the Linux kernel

      • Security management
      • Memory management
      • Process Management
      • Power Management
      • Hardware Drivers
  3. Android architecture

    • Applications: Applications such as desktop apps, phone apps, browsers, etc.
    • Applications Framework:activitymanager, WindowManager, ContentProvider, ResourceManager, etc.
    • Libraries:sqlite Library, Surfacemanager, WebKit, Oppengl and so on.
      • Android runtime
        • Core Libraries
        • Dalvik Virtual Machine
    • Linux Kernel: Hardware drivers, power management, etc.
  4. Dalvik the difference between a VM and a JVM

    1. Post-compilation file format:
      • JVM:. Java->.class->.jar
      • Dalvik:. Java->.class->.dex->.odex
    2. Based on the different architectures
      • JVM Stack-based architecture (stack memory)
      • Dalvik Register-based architecture (CPU) with higher execution efficiency than JVM
    3. Dalvik specifically optimized for mobile platforms
      There are many class files in the JVM jar package, each containing header information, Chang, fields, methods, and so on, and there is only one Dex in the APK, which includes all header information, Chang, methods, etc. This way, reading a file is better than reading multiple files to find blocks.
  5. CPU Processor Architecture

    1. x86
      • Intel
      • Amd
    2. Arm
      • Motorola
      • Samsung
  6. Android Project directory structure

    1. SRC: Source code
    2. Gen: System automatically generated files, R.java the various resource IDs in the project are recorded
    3. Res: system resources, all files will generate resource ID in R file
      • Drawable: Pictures
      • Layout: interface Layouts
      • Values: Data
      • ANIM: Defining XML for animations
      • Raw: Native File
    4. Assets: Resource path, not registered in R file
    5. Project.Properties: For eclipse use, read the item using the Android version number. Earlier versions are named Default.properties
    6. Androidmanifest.xml: Manifest file, read when software is installed
      The four components of Android (Activity, ContentProvider, Broadcastreceiver, Service) require that the permissions required to register the program in the file also need to be declared in this file, for example: Phone, SMS, Internet, Access SD Card
    7. Bin: binary files, including class, resource files, Dex, APK, etc.
    8. PROGUARD.CFG: A configuration file used to confuse code to prevent others from recompiling
  7. APK installation Process

    1. Eclipse compiles. Java source files into a. class
    2. Convert all. class files to. dex files using the DX tool
    3. The. dex file and all resources are then packaged and signed as an. apk file
    4. Install the. apk file to the virtual machine Completion program installation
    5. Start Program – Open process – turn on the main thread
    6. Create Activity Object – Execute OnCreate () method
    7. Initialize the interface according to the Main.xml file

    In a nutshell, the installation of the software is two processes

    • Copy the apk to get some files to a directory in the system, 1./data/app/directory, 2. Create a folder/data/data/com.test.helloworld/to save the data
    • Configure some information in the registry of your system. Data/system/packages.xml
  8. Android Security Science
    An important design point in Android security is that applications do not have permissions to perform actions that are harmful to other applications, operating systems, or users by default. These actions include reading/writing the user's privacy data (such as contact or e-mail), reading/writing other application files, performing network access, maintaining device activity, and so on. So there is a need to request permission for actions that involve paying or that may be related to user privacy.

  9. Test classification
    Integrated test (function test), unit test, testing (intergation test)

  10. Android Unit Test

    • Configure in Androidmanifest.xml to import the JUnit environment of Android
    • Writing the test class inherits Android's Test parent class, Androidtestcase this class (Androidtestcase is to simulate a mobile phone environment, this class has a GetContext method to get to the current test class application context object, So this method has to wait until the test framework has been initialized before it can be called.
    • The method name of the test is required to start with a lowercase test, such as not starting with test can only be run alone, the whole run without this method, all the test methods to throw an exception, to throw exceptions to the test framework can not be captured by themselves.

    Note: The test code can only be run on the phone, it was tested on the phone and then sent the message to eclipse

    • Email: [Email protected]
    • Good luck!

Introduction to Android Intro

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.