Document directory
Get:
HTTP request details have been explained in my blog:
Http://blog.csdn.net/xiazdong/article/details/7215296
I have encapsulated an HTTP request helper class in the http://blog.csdn.net/xiazdong/article/details/7725867, so
File Upload is divided into two parts:
(1) server: Use fileupload + common. Io to upload files;
(2) client: the HTTP Request Header for simulating File Upload;
I. server code
Fileservlet. Java
Package Org. xiazdong. servlet; import Java. io. file;
I. JUnit test for Android
We have used JUnit in general, and JUnit for Android is similar. The results are green and red.
The overall unit test framework is as follows:
Here we will only introduce one of the classes: androidtestcase;
2.
1. Introduction to implicit intent
Explicit intent we mentioned earlier, such:
Intent intent = new intent ();
Intent. setclass (this, other. Class );// This statement indicates the explicit intent, because the activation object is explicitly set to
Document directory
1. Save
2. Read
I. sharedpreferences application scenarios
Sharedpreferences is used to save parameters;
It is saved as an XML file in the/data/package/shared_prefs directory;
Ii. sharedpreferences core code
1.
GET/POST requests for Android-HTTP connections
The Apache httpclient (Org. Apache. http. *) module is provided in the android SDK. This module involves two important classes: httpget and httppost.Creation steps: 1. Create an httpget (or httppost)
Retrieve image thumbnails:
Java code
Byte [] imagebyte = getimagefromurl (urlpath. Trim ());
// The following is to convert the image into a thumbnail and then load it
Bitmapfactory. Options = new bitmapfactory. Options ();
Options.
Generally, you can use imagebutton to display a button. However, sometimes we want to change the button status, for example, before the button is pressed, after the button is pressed, it is another way. Android allows us to change the button image
Call transfer cannot be disabled
1. Call Transfer Overview
The call transfer function is a basic service provided by the carrier. you can log on to the website of the carrier to check whether your SIM card has been activated. There are four options
Android is essentially Linux. Therefore, android can be accessed as Linux to access system information:
Proc file system
The proc file system is a special file system introduced by Linux kernel developers to reduce the complexity of system
Network operations are an essential part of the android program for network communication. The Android platform has three network interfaces available: java.net. * (standard Java Interface), org. apache httpcomponents interface and android.net. *
The text appearance settings and actual display in the Android system
Android: textappearancexml:
For example, "Android: textappearance ="? Android: ATTR/textappearancelargeinverse"
The reference here is a built-in system appearance ,? Indicates
Hello everyone, this section describes the use of LayoutInflater. In actual development, the LayoutInflater class is very useful. Its function is similar to findViewById (),
The difference is that LayoutInflater is used to find the xml layout file
I. Preface:
Hello everyone, today I will share with you about the latencies in Android. We often encounter an application (apk) that we think is very beautiful and handsome, so we will try to use tools such as WinRAR to view it, the general
The constructor of simpleAdapter is as follows:
SimpleAdapter (Context context, List Data, int resource, String [] from, int [])
A SimlpleAdapter works. Assume that SimpleAdapter is used for ListView. Each list item in ListView is the layout
When Android is started, the kernel of the kernel is automatically loaded into the memory for running. Its main function is to initialize the drivers of various devices, such as cameras, Bluetooth, and telephones.
Start the system process according
Personal email: xiaokeweng@gmail.com
This rough introduction-the basic functions of the source file/module under the Netd folder, and the organizational relationship between the main classes.
I. File Composition
Source file module under the Netd
Personal email: xiaokeweng@gmail.com
We first instantiate NetlinkManager according to the execution sequence of the main function code. The following code is used.
If (! (Nm = NetlinkManager: Instance () {// instantiate the object nm ALOGE
When we conduct android automated testing, there are often no html reports, which are very tangled. Let's take a look at how to generate html reports.Condition:1. android Development EnvironmentTestutils. jar package
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