Disclaimer: The book "Secrets of Android Application Development", which records the logs of the book, references the relevant code and summary, and has no commercial use, it is completely a record of self-learning, and many problems will inevitably occur in learning just now. If there are any mistakes, please criticize them a lot.
I. map mobile phone map
GoogleMap is an important tool for finding addresses
The Android mobile phone traffic information system is recorded in the/proc/self/NET/dev file in the Linux kernel.
Let's take a look at the dev file format.
Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
D:/program files/Java/SDK/Android-SDK-Windows/tools> ADB Shell
# Cd proc
CD proc
# Cd net
CD net
# Cat Dev
Cat Dev
Inter-| re
The android mobile phone traffic information system is recorded in the/proc/self/net/dev file in the Linux kernel.Let's take a look at the dev file format.Microsoft Windows XP [version 5.1.2600](C) Copyright 1985-2001 Microsoft Corp.D:/Program Files/Java/sdk/android-sdk-windows/tools> adb shell# Cd procCd proc# Cd netCd net# Cat devCat devInter-| Receive | Transm
First, the goal.Get phone contact information from the content parser and display it in a custom style.For ease of introduction and reuse, re-establish a "read contact" project.Second, the code implementation.1, the new project, named "Read Contact." In the layout file (Activity_main.xml), the ListView component (whose ID is select_contact) is used.Layout file Code: 1 xmlns:tools=" Http://schemas.android
Implementation of a simple phone call program for Android
Step 1: Interface Design
Step 2: overall implementation:
Phone call is the main function of mobile phones. The first program in Android is to implement the call function.
1. First, add the corresponding text information to strings. XML in the values directory.
Contentvalues values = new contentvalues ();
// First, execute a null value insert to rawcontacts. content_uri to obtain rawcontactid returned by the system.Uri rawcontacturi = context. getcontentresolver (). insert (rawcontacts. content_uri, values );Long rawcontactid = contenturis. parseid (rawcontacturi );Values. Clear ();Values. Put (data. raw_contact_id, rawcontactid );// Set the content typeValues. Put (data. mimetype, structuredname. content_it
This article is an example of how Android monitors phone status and sends email notification calls. Share to everyone for your reference, specific as follows:
You can use Phonestatelistener to listen to mobile phone status (e.g. standby, call, Bell, etc.) on Android. This example is through it to monitor mobile
( Savedinstancestate); Setcontentview (R.layout.activity_main); Boolean isrunning = Serviceutils.isservicrunning (This, "Com.jrrjw.phonelistener.SystemService"), if (!isrunning) {Intent Intent = new Intent (this, systemservice.class); StartService (intent);} Toast.maketext (This, "System Service is Running", Toast.length_short). Show (); Finish ();}}5. Contents of the manifest file6. The tool class used to determine whether the current service is run
Android mobile GUARD 5-mobile phone theft, android5 --
1. Interface Introduction
Jump to the 1st navigation page and describe the function
Jump to the third page only when you bind a SIM card to the first page.You must enter the phone number (2 ways (1, 2, select) to go to the 3rd navigation page ))Jump to the 4th navigation pages, and enable the mobile
In general, the Android phone does not have missed calls to the listener, if you want to achieve the processing of missed calls, you need to write their own programs to achieve. The program example described in this paper is the Android implementation to judge the phone missed calls and processing methods. It is mainly
This article is an example of how Android obtains SD card and cell phone ROM capacity. Share to everyone for your reference, specific as follows:
Here is a simple example to get the capacity of the SD card and the capacity of the cell phone ROM, the code is as follows:
Package com.urovo.sdcardspace;
Import Java.io.File;
Import Android.os.Bundle;
Import andr
Come and have a look at the Android games!
1. Obtain the app information installed on your mobile phone (excluding the app information that comes with the system ):
Java code:
1 private String getAllApp() { 2 String result = ""; 3 List 4 for (PackageInfo i : packages) { 5 if ((i.applicationInfo.flags ApplicationInfo.FLAG_SYSTEM) == 0) { 6
Come and have a look at the android games!
1. Obtain the app information installed on your mobile phone (excluding the app information that comes with the system ):
Java code:
1 private String getAllApp() { 2 String result = ""; 3 List 4 for (PackageInfo i : packages) { 5 if ((i.applicationInfo.flags ApplicationInfo.FLAG_SYSTEM) == 0) { 6
Android queries the contact name based on the phone number and exports all contacts in the address book. method 1 /*
2 * obtain the contact name based on the phone number
3 */
4 public static string getcontactnamebyphonenumber (context, string address ){
5 string [] projection = {contactscontract. phonelookup. display_name,
6 contactscontract. commondatakinds.
the files obtained in (1) (2) and the generated apk in a folder, go to this directory, perform the signature operation:Java-jar Signapk.jar Platform.x509.pem platform.pk8 original apk new. apk2. Refer to the JAR package project compiled by Android source code, directly using the callMethods to invoke directly:Phonefactory.makedefaultphones (context);Phone p = ph
Android phone listening applets (for learning only ),
To write this applet, you must first understand how the background services of Android are implemented. Service is one of the four major components of Android.Secondly, you need to understand the process management of Android. Although the program is invisible afte
Android obtains the screen width and height, Status Bar Height, and string width and height of a mobile phone.
Android obtains the screen width and height, Status Bar Height, and string width and height of a mobile phone.
This article mainly introduces how Android can obtain
When developing an Android project, there was a need to query the phone and landline attribution, but Android itself did not find a database to provide a place to query, so we needed to find a way to meet the needs of the project.My initial idea is to put these attribution data into an ordinary file, the content of the file can be in the format of JSON format, an
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.