Logcat
Dump a system message log. These messages include the stack trace when the simulator throws an error. Android log
A logging class used to write messages to log files on the simulator. If you run logcat on ddms, you can view messages in real
1. Start Android simulator 2. Set *. copy the APK file to the toolsdirectory of Android sdk(click to download the android123.apk file), use the CD command of CMD to locate it in the android simulator directory tools, and execute ADB install *. APK
In Android, The include tag is a good solution to facilitate control overwriting. However, there are also some points to note. Below is a problem I encountered in the project. Make this record for later viewing. Include label usage. 1. Create an XML
Android assigns a separate user space to each APK process. The userid in its manifest corresponds to a Linux User (the Android system is based on Linux. therefore, mutual access to data between different APK (users) is disabled by default.
However,
Android auto-start is probably the simplest in the mobile operating system. We only need to listen to a Broadcast (Broadcast) started at the startup. First, write a Receiver (that is, a broadcast listener) that inherits BroadcastReceiver, as shown
Why do we need feedback on the Crash report?
For Android applications, we should try to avoid Crash. Although zero-Crash is the ultimate goal pursued by programmers, the reality is that programmers can only minimize the occurrence of Crash, and it
I don't want to mention anything. the most disgusting thing is that it will start several programs and background services that I don't even need for various reasons without knowing it. Sometimes it is even incredible, then these processes are still
First, understand the two words
OnTouchEvent: triggers a touch event
OnInterceptTouchEvent: triggers the interception touch event
View Source Code and class inheritance relationships
OnInterceptTouchEvent: A method defined in ViewGroup. This event
In the android-sdk \ toolsdirectory, there is an executable program named emulator.exe. The emulator is a simulator or simulator, but many people may find that the emulator cannot be opened through the AVD simulator, just a few clicks, but it cannot
As follows:
First load by default
Select the original queue:
Cascade:
Key code: bind Id to the selected event listener in the drop-down list:
Copy codeThe Code is as follows: int pos = firsthand_dlbh_pinner.getSelectedItemPosition
1. Activity Lifecycle
During Game Development, we only need to reload the onCreate (), onResume (), and onPause () methods, because onResume () and onPause () methods will be called no matter how it is. After onPause (), the system may kill the
Copy codeThe Code is as follows: public class MenuEx extends Activity {
Private static final String TAG = "android123 ";
@ Override public void onCreate (Bundle savedInstanceState ){
Super. onCreate (savedInstanceState );
SetContentView (R. layout.
1. the starting point of all the processes is to press the dialing key after dialing. The code for this step is TwelveKeyDialer in the/android sourcecode/packages/Contacts/src/com/android/contacts/directory. in the java file, the related code is as
Handler usage
1. the Handler class is android. A class in OS, handler. post (Runnable r) can add a thread to the Message Queue; handler. postDelay (Runnable r, long delayTime) adds the thread to the Message Queue after the delay of delayTime
An example of google protocl buffer serialization and deserialization
You must first define the Protocol File relation. proto. The file content is as follows:
Package mooon. rpc;
Option cc_generic_services = true;
Message ReqUserInfo{Required uint32
This article describes how to save the image resources of android Assets to the SD card. If you are interested, refer to the following:Copy codeThe Code is as follows:
Public class ReadBitmap {Public void readByte (Context c, String name, int
1. query several android devices connected to the adb server> Adb devicesList of devices attached0123456789 ABCDEF device2. install an apk to the android device.> Adb install-r B: test6577PinyinIME.apk2509 KB/s (1284852 bytes in 0.499
Recently, I was wondering how to compile an Android battery plug-in on the desktop. First, this App has practical value, and second, the compilation workload should not be very large, you don't have to spend too much time learning the development
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