Android preliminary: Communication Technology & amp; Android introduction, Android Communication

Source: Internet
Author: User
Tags android sdk manager

Android preliminary: Communication Technology Introduction & Android introduction, Android Communication

Communication Technology:

1G analog system can only be used for voice calls.

2g gsm, CDMA sends and receives text messages and emails.

2.5g gprs, EDGE access to wap network data. (pictures, wallpapers, text information)

3g wcdma (China Unicom), CDMA 2000 (China Telecom), TD-SCDMA (mobile)
Send Weibo posts and view high-definition images and small movies.

3.5g hsdpa, HSDPA +

4G TD-LTE download speed: 50 Mb/s = 6 MB/s upload speed: 10 Mb/s = 1.2 MB/s

100 Mb/s! = 100 MB/s

1 Byte = 8bit

100 Mb/s = 12.5 MB/s

 

Android Development History

1.5 Cupcake)
1.6 Donut (Donut)
2.1 Eclair (lightning puff)
2.2 Froyo (frozen yogurt)
2.3 Gingerbread (ginger pie)
3.0 Honeycomb (Honeycomb) flat
4.0 Ice cream SandWich (Ice cream SandWich)
4.1 Jelly Bean (Jelly Bean)
4.2 Jelly Bean (Jelly Bean)
4.3 Jelly Bean (Jelly Bean)
4.4 KitKat (Nestle chocolate)
5.0 Lime Pie (acid orange Pie) not released yet

 

Differences between Android and Java virtual machines:

JVM:. java --> javac -->. class --> jar -->. jar
Architecture: Stack

DVM:. java --> javac -->. class --> dx. bat -->. dex
Architecture: Register (a high-speed cache on the cpu)

 

 

Solve the problem that Android SDK Manager cannot download the SDK

Unable to update or download the SDK because the Chinese mainland intercepts Google servers

Append the following information to the hosts file (directory: C: \ Windows \ System32 \ drivers \ etc ):
74.125.113.121 2.16.android.com
203.208.46.146 dl.google.com
203.208.46.146 dl-ssl.google.com

 

Explanation: ADB Android Debug Bridge

Android debugging Bridge: Use the adb command
Tracking the complete path of adb.exe in pathin the system environment
D: \ IDE \ adt-bundle-windows-x86-20130729 \ sdk \ platform-tools

 

The following command is used to configure the environment variables of adb.exe ):

1. adb devices -------------- list all devices

2. adb start-server -------------- enable adb Service

3. adb kill-server ---------------- disable the adb Service

4. adb logcat ---------------- view Log

5. adb shell ---------------- space attached to Linux (similar to operating in linux)

6. adb install <application (with extension)> ---------------- install the application

7. adb-s <simulator Name> install <application (with extension)> -------------- install the application to the specified Simulator
8. adb uninstall <package name> ---------------- uninstall the application. uninstall the application based on the package name.

9. adb pull <remote> <local> ---------------- copy files from the remote server (Android) to the local Machine

10. adb push <local> <remote> ---------------- copy the local file to the remote host (Android)

11. emulator-avd <simulator Name> ---------------- manually start the Android Virtual Machine

12. ctrl + F11 horizontal and vertical screen switching -------------- switch between portrait and horizontal screens by using the shortcut key in the Virtual Machine

 

Android directory in Eclipse

Project directory structure:
Src: stores java code
Gen: id of the resource in the. R. java folder that stores automatically generated files.
Project. properties: Specifies the version of the development kit used by the current project.
Libs: The jar package that the current project depends on.
Assets: stores media files required by some programs.
Bin: the compilation directory of the project. Save some edited documents and the. APK files of the current project.
Res (resources): resource file.
Drawable: stores the pictures used by the program.
Layout: stores layout files of android.
Menu: stores the layout of the OptionsMenu menu of android.
Values (the data required by the application. The id is generated in the R file)
Strings. xml stores android strings.
The dimensions used for screen adaptation are stored in dimens. xml.
Style. xml stores the style displayed in android.
Values for values-sw600dp 7-inch flat
The value of the values-sw720dp-land 10-inch flat
The values-v11 specifies the display style for mobile phones later than 3.0.
The values-v14 specifies the display style for mobile phones later than 4.0.
AndroidManifest. xml: The portal file of the android application. It declares the components in android and related configuration information.
Proguard-project.txt: used to encrypt the current program.

 

Android package and install the application

Compile the classes. dex file (see slides 20)
Compile the resources. arsc File
1. Compile and convert resource files from text format to binary format.
2. Source index table resources. arsc.
3. the binary format converted from resources. arsc.

ADB (android debug bridge) facilitates developers
IDE Eclipse automatically implements all the above processes


Run as Android Application ):
1. Generate the apk file.
1). Generate the. dex file.
2). Generate resources. arsc.
3) Prepare the uncompiled file.
4). Convert the AndroidMenifest. xml file to binary.
5). use debug. keystore to package and sign the entire application.

2. Load the apk file to the simulator.
Load the apk file to/data/local/tmp/xxx.apk

3. Install the application.
1) Cut/data/local/tmp/xxx.apk file/data/app/package name -1.apk
2) create a folder with the package name under the/data/folder to store the data of the current program.
3) Add a record to the packages. xml and packages. list Files respectively.


This topic describes the best Android mobile phone address book.

For power-over. It is widely recognized that it is easy to use. Professional. The rest are full of water !!!
 
Serial Communication in android

Use c to implement the open and close Methods of the production port;
The open method returns a FileDescriptor;
Java calls open through jni, and then uses new FileInputStream (fileDescriptor) and new FileOutputStream (fileDescriptor) to get the input and output streams and read and write them;
I have done a project in this way.

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.