C # the roadmap for programmers to learn the Android development series,
Through the previous three blogs, I have briefly introduced the Android development process and wrote a simple demo to understand the Android development environment and some background knowledge.
Next, this blog will not continue to learn the details of Android development. Let's stop and clarify the following learning objectives and learning routes.
I. basic understanding of Android Development
1. Android native development is based on the Java language. Because I am good at C #, I am not very familiar with the Java language. Therefore, I need to strengthen the basic Java Language exercises, I will introduce this part into the practice of specific knowledge points, and compare it with the C # language where necessary (in fact, it is basically similar to the syntax level, but I just need to sort it out ).
2. Android is essentially a client, so it is developed based on the C/S mode (B/S is essentially C/S, but it is a special C/S, the browser acts as the client). To communicate with the server, you must use http, TCP/IP, and other protocols. Therefore, we can request the server to obtain data through http get or post actions. We can also use socket (tcp/udp) to obtain data, as well as a common WebService, however, all these require the support of the server program. Although I have also done java web development, I know that java has servlets (corresponding to ASP. NET) can be used as a server program, but after all, the first programming language I use is C #, therefore, I will use the specialized network communication application framework WCF or lightweight Web API in C # As the server support (the only defect is that it can only run on windows platforms, however, it may be possible to implement the so-called cross-platform ).
3. databases are also used for Android development, not Oracle, SQL Server, or MySQL. These must be installed on servers. Access is a file-type database provided by Microsoft, android is not supported (maybe later ). Some people may say that they can use properties, xml and other files to store data? Of course, but after all, it is a file, not a database, and does not have basic database management functions. Therefore, we need a file-type database that supports Android. Sqlite is a popular file-type database.
4. The current program has higher and higher requirements on the UI part. The user's evaluation of an application is good. In addition to availability, it mainly depends on whether your UI looks good and whether it is user-friendly. The user does not understand the technology behind it. What he sees is the interface. In Android development, the interface is beautified by style, texture, and other means.
Ii. Architecture of Android
From the bottom layer to the top layer, the order is as follows:
1. Linux kernel layer
Android is essentially a Linux operating system. The Linux Kernel provides basic functions such as memory management, process management, and network protocols.
2. System runtime database layer
Including the system library and Android runtime. For example, the Surface Manager in the system library is responsible for managing the display, the Media Framework is responsible for multimedia functions, and SQLite is a small RDBMS. The most important part is the Android runtime, including the core library and Dalvik Virtual Machine (google designed a Java Virtual Machine to prevent copyright issues, instead of using the oracle jvm ).
3. Application Framework Layer
Provides a set of ready-made components to help programmers simplify development
4. Application Layer
Is an application that already exists in the Android system.
As we know, most of the time we are developing based on the application framework layer and the system Runtime Library layer.
3. Basic Steps for Android Development
Aside from the general process of software development such as requirement analysis and architecture design, we need to take the following steps to narrow down the scope to Android development:
1. Create a layout file, and draw multiple layout
2. Create an Acitivity file and load the corresponding layout file in the OnCreate method. Coding of implementation programs
3. register the Activity in the AndroidManifest. xml list file and add various permissions required for running the program.
4. Package and release the apk and install it on your own (currently the popular QR code is scanned, and then installed)
To sum up, I will focus on the Android client. on the server side, I will use the. NET technology that I have mastered (such as WCF and Web APIs ). If the underlying knowledge of the operating system is involved in the learning process, we will take a look at it as appropriate. The goal is to be familiar with Android application development.
In the C language, what is the symbol (->) and how to use it?
This is a symbol in the struct pointer. Write a program to explain it, for example:
# Include <stdio. h>
Struct STU // define a struct
{
Int num;
} Stu;
Int main ()
{
Struct STU * p; // defines a struct pointer.
P = stu; // p points to the struct variable stu.
Stu. num = 100; // attaches an initial value to the struct member num.
Printf ("% d", p-> num); // output the num value in stu
Return;
}
As you can see, the-> method is to reference the variable in the struct !!
Format: p-> struct member (such as p-> num)
The function is equivalent to stu. num or (* p). num.
I don't know. You don't understand, and don't understand call me. O (∩ _ ∩) O ~
Hope to adopt it.
In the C language, what is the symbol (->) and how to use it?
This is a symbol in the struct pointer. Write a program to explain it, for example:
# Include <stdio. h>
Struct STU // define a struct
{
Int num;
} Stu;
Int main ()
{
Struct STU * p; // defines a struct pointer.
P = stu; // p points to the struct variable stu.
Stu. num = 100; // attaches an initial value to the struct member num.
Printf ("% d", p-> num); // output the num value in stu
Return;
}
As you can see, the-> method is to reference the variable in the struct !!
Format: p-> struct member (such as p-> num)
The function is equivalent to stu. num or (* p). num.
I don't know. You don't understand, and don't understand call me. O (∩ _ ∩) O ~
Hope to adopt it.