For example, I have an application, only with Jiangsu Telecom signed, that is, only Jiangsu Telecom mobile phone number of users can use our services, but because of the possibility of other areas of the user will also register, then I need to determine the cell phone attribution, in the absence of similar interfaces such as ip138, how can I judge the mobile
Requirement Analysis:
Use ContentResolver to operate the data of the content provider, display the name and phone number in listView, and carry the add and delete buttons for corresponding operationsSteps:
Adater model layer create content parser object ContentResolver define URI custom CursorAdapter implement constructor public MyCursorAapter (Context contex
READ_CONTACTS code for AndroidManifest. xml:
After the above files are compiled, the application can run correctly on the Android2.1 simulator.
What if the app runs on android1.6? 1.6 does not have the ContactsContract class system, so an error will be reported. Note that the ContactContract class is added in API Level 5, which is not supported in earlier Android versions.
On Android 1.6 (API Level 4), The fillMaps () method is implemented as follows:
Private List
Then it can run on 1.6. T
Description Given A list of phone numbers, determine if it is consistent in the sense this no number is the prefix of Anot Her. Let ' s say the phone catalogue listed these numbers:1. Emergency 9112. Alice 97 625 9993. Bob 91 12 54 26In this case, it's not possible-to-call Bob, because-the central would direct your-to-the-emergency line as soon as Y OU had dialle
principle.
Actually, you can modify the call to display this stuff. Any engineer or technician in a phone, communication, network call (VoIP), or mobile phone manufacturing company knows it, just like hackers must know what an IP address is, and they can do it easily without any difficulty ......
First, learn a little about data transmission over the telephone network. The materials are as follows:
The fo
obtain the IMEI number, it is necessary to add permissions.The advantage is that the phone is uniquely identified and the disadvantage is that the appropriate user rights may be required.String Myimsi = Android.os.SystemProperties.get (Android.telephony.TelephonyProperties.PROPERTY_IMSI);String Myimei = Android.os.SystemProperties.get (Android.telephony.TelephonyProperties.PROPERTY_IMEI);The second method:
number provided by the SIM card.* The SIM card status must be SIM_STATE_READY (determined by getSimState ).*/Tm. getSimOperator (); // String
/*
* Service provider name:* For example, China Mobile and China Unicom* The SIM card status must be SIM_STATE_READY (determined by getSimState ).*/Tm. getSimOperatorName (); // String
/** Sim card serial number:* Permissi
This example for you to share the common iOS regular expressions for your reference, the details are as follows
#import "Nsstring+regexcategory.h" @implementation nsstring (regexcategory) #pragma mark-Regular related-(BOOL) Isvalidatebyrege
X: (NSString *) regex{nspredicate *pre = [nspredicate predicatewithformat:@ "SELF matches%@", regex];
return [pre evaluatewithobject:self]; #pragma mark-//Mobile phone
I recently started to learn about Android, mainly focusing on the secrets of Android Application Development. In chapter 3rd, example_03_02 is an example of reading the name and phone number of contacts in the address book. However, due to API 2.0, each contact can have multiple phone numbers (such as mobile phones, residential buildings, companies, and faxes). T
When you contact this tutorial, the method used to select a contact is to read the contact from the database, and then display it with listview. After selecting the contact, the mobile phone number is returned,
In this way, when you click to select a contact, it takes time to load and the displayed contacts do not seem to be full,
In short, it is not good. You do not have to process the interface by calling
You need to obtain the mobile phone number for a recent project. The mobile phone card used in the project is a telecom card.
Methods that do not meet the requirements on the Internet
Google:
// Obtain the mobile phone number TelephonyManager tm = (TelephonyManager) this. g
is to obtain the mobile phone number of the selected contact. First, you need to use the onActivityResult function to obtain the selected contact and then query the mobile phone number of the contact through the Content Provider. The code snippet is as follows:Java code@ Ov
Yazhizhao * 20142014-10-22 morning 9:13:04 */package com.example.android_sms;import android.content.Context; Import Android.telephony.telephonymanager;import android.util.log;/** * @author Yazhizhao 20142014-10-22 9:13:04 */ public class Simcardinfo {/** * Telephonymanager provides access to information about the communication service on the device. Applications can use this class of methods to determine the access information of telecommunications providers and countries as well as certain typ
Title:Given a digit string, return all possible letter combinations, the number could represent.A mapping of Digit to letters (just as on the telephone buttons) is given below.Input: Digit string "Output": ["Ad", "AE", "AF", "BD", "Be", "BF", "CD", "CE", "CF"].Note:Although the above answer is in lexicographical order, your answer could are in any order you want.Answer 1: Recursive method (DFS)idea: We follow the
cannot begin with 0.Part Three: You can have decimals or no decimals, but once a decimal point appears, at least one digitvar reg =/^[+-]? (\d| [1-9]\d+) (\.\d+) $/;
Valid positive integer (contains 0):/^[+]? (\d| [1-9]\d+) $/;
Valid negative integer (contains 0):/^-(\d|[ 1-9]\d+) $/;
Judge mobile phone number (simple version):var reg=/^1\d{10}$/;
Judge the mailboxThe first part: numbers, letters, unde
com.example.android_sms;import android.content.Context; Import Android.telephony.telephonymanager;import android.util.log;/** * @author Yazhizhao 20142014-10-22 9:13:04 */ public class Simcardinfo {/** * Telephonymanager provides access to information about the communication service on the device. The application is able to use this class of methods to identify the telecommunications service provider and the country as well as certain types of user a
Implement preset contacts (including names and numbers) to the mobile phone. Ensure that the contacts are read-only and cannot be deleted or edited.The code is divided into two parts:Part One inserts the preset contacts into the database;In Part Two mode, you cannot delete or edit a preset contact on the contact details and contact multi-choice interface.[Note] If you do not need to restrict the delete/edit operations of the preset contact, add only p
There are already a lot of mobile phone numbers on the network to query the API interface, but these interfaces are always some large and small defects.Summarize these flaws:1, to directly paste its search box link form to their own page, click on the query when you want to jump to their site to show the results of attribution2, the API to provide the interface, generally require payment, or a day only free limited
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.