Next I will talk about how to collect abnormal information about the program running process. For more information, see
When writing a program, we hope to write a program without any bugs and expect that the program will not crash under any
The following describes the implementation code for reading the user number, mobile phone string number, and SIM card serial number from Android.
1. Use the core code provided by TelephonyManager:
Copy codeThe Code is as follows:
TelephonyManager
Problem:
During the test, it is found that the Display Effect of applications on different monitors is different (some texts cannot be completely displayed). Naturally, the screen adaptation problem occurs.
Sort the rules as follows:
(1) several
It takes more than 40 seconds to start the system. It takes only 28 seconds to start the system normally.
I did not analyze the kernel startup, but another colleague analyzed it. I mainly analyze the time from the start of SystemServer to the end of
In Android, you can play a video in three ways:1. Use its own player. Specify Action as ACTION_VIEW, Data as Uri, and Type as its MIME Type. 2. Use VideoView for playback. In the layout file, use VideoView and MediaController to control it. 3. Use
The Settings data is stored in com. android. providers. settings/databases/settings. db.
The default data in the database is in frameworks/base/packages/SettingsProvider/res/values/defaults. as defined in xml, if you want to add a new field to the
Mobile devices running Android applications are limited by their computing capabilities, storage space, and battery life. Therefore, it must be efficient. Battery life may be a reason for your optimization, even if it seems to be running fast enough.
Hardware:
The default value of Density acted LCD Density is 160. The most direct display is the cell phone icon and text size. The minimum value is 120. It can be customized based on the resolution size. Generally, the default value is
To add this function to the framework, write an appliction to obtain the running application:Let's take a look at the figure first: this app is mainly used to obtain non-system applications and some common system applications, which are displayed in
I. Overview
The default title bar of each application (note the difference with the status bar) has only one line of text (the name of the project when the project is created), and the color and size are fixed, which makes people feel monotonous.
This is often the case in development. After a button is clicked, the Toast or Dialog will pop up. If you click it again quickly, the Toast will appear again. the effect we want is that the click takes effect only once in a certain period of time,
Creating a new project is simple. As long as you have installed the Eclipse plug-in and your Eclipse software version is 3.2 or 3.3, you can start development.
First, let's take a look at the advanced steps for creating the "Hello, World" program:
1. Do not read Android development documents
The Android developer website can help you. Many documents can also be downloaded using SDK tools. These documents are not just a reference for the Javadoc API, but contain many guides, tutorials, videos,
I. Basic Knowledge:
1. An Intent object contains a set of information:
1. Component name specifies the Activity to be started
2. What to do with Action
3. Data Transmission
4. Category
5. Extras key-value pairs
6. Flags
2. Basic Intent usage:
[Java]
[Plain]
Android: layout_above: Move the control's bottom to the control with the given ID
Android: layout_below: place the top of the control under the control with the given ID
Android: layout_toLeftOf align the right edge of the control with the
I. Basic Knowledge:
To achieve this effect, a container is required to store the images displayed by Gallrey. Here, these images are loaded using a derived class inherited from the BaseAdapter class.
We need to listen to the setOnItemClickListener
1. Configure the search description file
Add sreachable. xml to the xml file in res. The content is as follows:
Xmlns: android = "http://schemas.android.com/apk/res/android"Android: hint = "@ string/searchLable"Android: label = "@ string/searchLable"
You can use the getDirection () method of RasterMap to query the path. Similar to the query address, the path query result notifies the application through the callback function, the following example returns the path from Nanjing to Beijing. The
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