Although Google provides the firstinstalltime interface (actually a public field) in packageinfo, it seems useless and the return value is zero. Google can actually get the installation time.
Packagemanager PM = context. getpackagemanager ();
The APK signature must first contain a keystore signature file.
The keystore is generated by the built-in JDK tool keytool.Start-> Run-> cmd-> Cd to JDK Directory D: \ Java \ jdk1.7.0 _ 01 \ bin(You can also add the JDK bin path to the environment
Tian haili @ csdn
2012-05-19
This article is an analysis and induction by the author, and is presented with a UML diagram (classdi#/ sequence di. Although it comes from the analysis of the android source code, the text will not take a lot of
/** How to write faster loops (after Dan bornstein, Google Engineer) * // * 1 (fastest) */For (INT I = initializer; I> = 0; I --){...} /* 2 second */INT Limit = calculatelooplimit (); For (INT I = 0; I List = getmylist (); For (type OBJ: List ){...}
Some time ago, my incorrect task sleep was intercepted during message formation and message delivery in windowmanagerservice. However, after the experiment, I found that I had taken a wrong path. Fortunately, it was not a failure.
To put it bluntly,
Download Android 1.5 ndk, Release 1
Jun 2009
The android ndk is a companion tool to the android SDK that lets Android Application developers build performance-critical portions of their apps in native code. It is designed for useOnlyIn conjunction
How to analyze the Android Application Performance and Java function call relationships.
1. mksdcard-l sdcard 512 M/root/. Android/sdcard. img
2. Add the start and end functions of trace to the application (For details, refer to the development
Android. the fileobserver class in OS is a listener for listening to file access, creation, modification, deletion, and movement operations, however, this listener only works for the level-1 sub-files under the monitored file directory,
The file
First, the android source code file neighboringcellinfo is required. aidl and itelephony. aidl: Create a folder named android. telephony (the file name must be this name), and the file neighboringcellinfo. copy aidl to this folder and create another
When creating a Web browser program, the system will usually encrypt the information to be generated in base64 mode.
(Encoding. After reading the android file, only the Android. OS. base64utils file is displayed.
The package is related to base64.
1. Add read/write permissions
XHTML code
Android: Name = "android. Permission. read_contacts"/>
Android: Name = "android. Permission. write_contacts"/>
Contact information URI:
Content: // com. Android. Contacts/contacts
Contact number
Mediastore is a multimedia database provided by the Android system. Multimedia Information in android can be extracted from this class. This mediastore includes all the information of the multimedia database, including audio, video, and image.
1. Use aapt to generate the R. Java class file:
Example:C: \ snake> aaptP-F-m-J Gen-s res-I Android. jar-M androidmanifest. xmlWhere-F-m-j f: \ Explorer \ androidbyread \ Gen indicates generating the R with package path under the gen directory in
Internationalization (international) is referred to as i18n, because there are 18 characters between I and N, localization (localization), or l10n. Generally, the language of a region is in the format of region _, such as zh_cn and zh_tw.
Country
In Android, we can rotate the Image Using Matrix post rotate.Example for Android image rotate :-
01
xml version="1.0" encoding="utf-8"?>
02
LinearLayout android:id="@+id/LinearLayout01"
03
Android has two classesAndroid. View. gesturedetectorAndroid. View. gesturedetector. simpleongesturelistener
(In addition, Android. widget. gallery seems to be a better ongesturelistener)
1)Create a class that inherits the simpleongesturelistener
The entire process of using socket in Android ndk is divided into the following parts:
Part 1: Create a socket and bind the IP address and port
# Include # include # include # define max_data_buf_len 10240 int SD = invalid_socket; sockaddr_in
Duplicate ID in XML in Android
Statement: Reprinted with the original address.
Today, when I was working on the project, I found that @ + id can be duplicated, and the program will not report an error. Depressed. What is going on? After Google and
Reprinted from http://dai-lm.iteye.com/blog/1264850
Http://bbs.dospy.com/thread-9991523-1-354-1.html
1. Download apktool. Jar
2. CD to the apktool directory
3. If the method in the original post cannot be used to run apktool, try "Java-jar apktool.
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