); Show.settext (name); edittextphone= (EditText) Findviewbyid (r.id.phone);p hone.settext (PhoneNumber);} Cursor.close ();} Break;}}}The value returned by ContactsContract.CommonDataKinds.Phone.CONTACT_ID is null============ Solution 1============
Reference 3 floor BDMH reply:
Not all can get, because the mobile operator did not put the mobile phone number data written to the SIM card
Recently do a project, need to get mobile phone number. The mobile card used in the project is a telecom card, so take this as an example.
The method of not meeting the requirement on the Internet
Google a bit, the online practice is as follows:
Get cell phone number
Telephonymanager TM = (Telephonymanager)
Mobile phone numbers are not available for all. Just a part of it can get.This is due to the fact that the mobile operator does not write data from the mobile phone number to the SIM card. The SIM card only has the unique number, for the network and the device recognition that is the IMSI number, the cell phone signal also can say is passes through this number in
All unread SMS messages on the phoneAt + cmgl = 2 list existing messagesAt + cmgl = 4 read all SMS messagesAt + cmgr = x press enter to read the X Short MessageAt + cmgf = 0 vehicle return PDU formatAt + cmgd = x press enter to delete the X-th Short MessageAt + clip = indicates the command error automatically displayed for incoming calls.Come to the phone! Ring + clip: 13306285091,129At + cmgs = 6 bytes for Sending Short Messages>0891683369503105f011
Write in front, send this post I think, maybe a lot of people can not use, then you become popular science understand, in fact, each game, the software will get your IMEIDon't talk nonsense, start!When developing a mobile app, developers are most concerned about how many users have installed and are using the mobile software they are developing. This requires identifying the uniqueness of the phone. Now I k
connection with the mobile phoneActivity. getsystemservice (context. telephony_service );
// Obtain the mobile phone number
String phoneid = TM. getline1number ();
// Remember to add in manifest FileAndroid: Name = "android. Permission. read_phone_state"/>
**************************************** **************************************** **************************************** ************************************
Http://www.eoeandroid.com/thread-91
Old style, no more nonsense to say, directly to everyone paste Java code.
The code is as follows:
Package Com.zzw.getPhoneInfos;
Import android.app.Activity;
Import Android.content.Context;
Import Android.os.Build;
Import Android.os.Bundle;
Import Android.telephony.TelephonyManager;
Import Android.util.Log; public class Mainactivity extends activity {@Override protected void onCreate (Bundle savedinstancestate) {super.
OnCreate (savedinstancestate);
Setcontentview (R.layout.activit
1, we download a computer to install a "Baidu key root tool" can not search for downloads.
2, good at the desktop double-click "Baidu a key Root" program to install.
3, then the Millet 4 mobile phone connected to the computer and then in the Millet 4 mobile phone to open "USB debugging" switch (Recommended reading: Millet 4 Open USB debugging Tutorial).
4, OK now Baidu a key root tool can identify our
);String appName = (string) Apps.loadlabel (PM);//Get a namedrawable AppIcon = Apps.loadicon (PM);//Get iconString AppPath = apps.publicsourcedir;//Get the path to the appint length = (int) new File (AppPath). Length ();Allcount+=length;Systemclock.sleep (100);String out = appname+ "~" +getfilesize (allcount);//This method is to convert bytes to KB or MB, write a
In Android development platform, you can get the native number via Telephonymanager. 1 telephonymanager phonemgr= (telephonymanager)this. Getsystemservice (Context.telephony_ SERVICE); 2 // txtPhoneNumber is a edittext used to display the phone numberNote:Depending on the security mechanism of Android, when using Telephonymanager, it must be in Androidmanifest.xmlAdd
Mobile phone numbers are not all available. Only a part of it can be obtained.This is because the mobile operator does not write data from the mobile phone number to the SIM card. The SIM card has only a unique number. For network and equipment identification that is the IMSI number, the cell phone signal can be said to pass through this number in the network, no
1: Get Packagemanager Get all statically installed apps:?
1
PackageManager pm = getPackageManager(); 0);
2: Get Activitymanager Get dynamic all running processes?
12
ActivityManager am = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);List" ; "+ info.uid
[[NSUserDefaults standardUserDefaults] valueForKey: @ "SBFormattedPhoneNumber"]; get the IMEI # import "Message/NetworkController of the mobile phone. h "NetworkController * ntc = [[NetworkController sharedInstance] autorelmei]; NSString * imeistring = [ntc IMEI]; imeistring is the obtained IMEI. IMEI (International Mobile Equipment Identity) is the abbreviation of International Mobile device Identity code.
How to get the current IP address of the mobile phone in IOS, and ios get the current ip Address
There are many similar posts on the Internet. After searching for information, I think the following method is the simplest,
You can directly drag the class method to your new category,
. H file
# Import @ Interface NSObject (GetIP)+ (NSString *) deviceIPAdress;@ End
Below I from the perspective of Android development, simply write how to get mobile device information and mobile phone numberPreparation conditions: An Android phone, mobile SIM card to ensure plug-in phone, Eclipse ADT and ANDROID-SDK development environmentFirst step: Create a new Android project (Jinshantest),and n
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.