How to obtain the phone number of the Local Machine on Android? Currently, an API is provided on Android to read the fixed number on the early SIM card,
CopyCodeThe Code is as follows: Private string getphonenumber (){
Telephonymanager mtelephonymgr;
Mtelephonymgr = (tele
Preface Welcome to share and recommend useful code segments ~~Statement You are welcome to repost, but please keep the original source of the article:CSDN:Http://www.csdn.net O Mo Li in the rainy season:Http://blog.csdn.net/luckkof
Body
Some SIM cards are not preset with the VoiceMail number at the factory, but the operator requires that the preset VM number be read from the mobile
China Telecom 2G segment, as well as China Telecom 3G (133, 153, 180, 181, 189), another card supports China Mobile or Chinese unicom 2G segment of the voice and SMS functions.Third-party operator 170th code segmentadd: China Unicom 4G 176, telecom 4G 177, Mobile 4G 178th segmentThe regular expression functions written according to these are as follows:Boolean Ismobileno (string mobiles) {2 string telregex = "13\\d{9}|14[57]\\d{8}|15[012356789]\\d{8}|18[ 01256789]\\D{8}|17[0678]\\D{8} "; False
In android mobile phone development, mobile phone numbers are sometimes required. In older SIM cards, China Mobile operator will write the numbers into SIM cards by default, but new SIM cards are often empty. To obtain the mobile phone number, you must manually set it to the
1 in the Android phone interface we only need to click on the "Standby interface" and then click "Phone", then we find the "dial-up interface" Input "* #06 #" input, as shown in the figure:
2 and then you can see the Android phone IMEI
A simple demo, from aggregation data to apply for mobile phone number attribution to the data interface;
Enter the query number in the EditText, get the number and use HttpURLConnection to get the JSON data in the child thread, then parse;
After data acquisition is complete, update the UI in the main thread to show t
1. The old version is unavailable in the new version, probably because the Skype activity structure changes:
// Intent Sky = new intent ("android. Intent. Action. call_privileged ");
// Sky. setclassname ("com. Skype. Raider ",// "Com. Skype. Raider. contactsync. contactskypeoutcallstartactivity ");// Sky. setdata (URI. parse ("Tel:" + phone ));// Startactivity (SKY );
2. Open the main page of Skype:
// Pa
Attribution to Data sourceHttp://webservice.webxml.com.cn/WebServices/MobileCodeWS.asmxWebxml website also supports other request methods such as soap and so onThe interface is relatively simpleXML version= "1.0" encoding= "Utf-8"?>LinearLayoutxmlns:android= "Http://schemas.android.com/apk/res/android"android:orientation= "vertical"Android:layout_width= "Fill_parent"Android:layout_height= "Fill_parent"Android:paddingtop= "5dip"Android:paddingleft= "5d
Attribution to Data sourceHttp://webservice.webxml.com.cn/WebServices/MobileCodeWS.asmxWebxml website also supports other request methods such as soap and so onThe interface is relatively simpleXML version= "1.0" encoding= "Utf-8"?>LinearLayoutxmlns:android= "Http://schemas.android.com/apk/res/android"android:orientation= "vertical"Android:layout_width= "Fill_parent"Android:layout_height= "Fill_parent"Android:paddingtop= "5dip"Android:paddingleft= "5d
Android provides an API to get the SIM card number, that is, to get the phone number of the local machine through telephonmanager.
It is particularly mentioned that information on the Internet shows that the new version of the dynamic zone card cannot be obtained. Is it unclear whether it is true? My card can be obtai
Android mobile phone number attribution query implementation
This part was learned yesterday, but because of the overload of eyes, we need to plan the time in the future.
Currently, the number attribution query in the mobile phone is mainly in two ways: 1. online query, 2. M
Reprint Please specify source: http://blog.csdn.net/jason_src/article/details/37757661There are many ways to get the package name and version number for other apps on your Android phone, which can be obtained directly from the APK package via AAPT or via code on your phone. Obviously, for the product or user to obtain
Yesterday realized 360 mobile phone Guardian's caller ID to display the function, the specific function is when the caller, display the current number of the place, after learning to find the operation
Very simple, the specific implementation of the code is as follows:
Addressservice.java
Package com.qingguow.mobilesafe.service;
Import Com.qingguow.mobilesafe.utils.NumberQueryAddressUtil;
Import An
Obtain the current network type (2g, 3g, 4g, wifi), mobile phone model, and version number of Android.Obtain the mobile phone model: android. OS. build. MODEL: android. OS. build. VERSION. the code used to obtain the current network type of the mobile
mainactivity as follows:
package cn.testgethandsetinfo; import android.os.Bundle; import android.text.TextUtils;
Import Android.widget.TextView;
Import android.app.Activity;
Import Android.content.Context;
Import Android.content.pm.PackageInfo;
Import Android.content.pm.PackageManager;
/** * Demo Description: * Get mobile phone model, system version, app version number and other information * * public
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.