Get started with Android, record the problems encountered in learning and some personal summaries.Contact database path is:/data/data/com.android.providers.contacts/database/contacts2.dbPermissions issues: Android 6.0 or more just write permissions in XML is not enough, the code also needs to write. if (Build.VERSION.SDK_INT >= build.version_codes. M checksel
", Toast.length_short). Show (); Intent i = New Intent (); i.setaction (settings.action_location_source_settings); startactivity (i);}When Locationprovider is not NULL, it is positioned, and when it is empty, prompts the user to open the location service and jumps in the code for the user to tick. LocationlistenerWhen locating, it is necessary to implement a Locationlistener position listening interface, mainly rewriting the onlocaiontchanged () methodOther methods that need to be rewritten are:
); Intent.putextra ("Return-data",true); Startactivityforresult (Intent, head_image_zoom); }}The above code gets the return value of the process, using three methods, the detailed implementation of the time is only one way to do. The third way is recommended.It is worth mentioning that. This small project needs to add a privilege value to the configuration file:uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>Error with
1. Open Android Studio at the bottom to find terminal such as2. Input command c: enter C drive3. Enter the command CD Users\administrator where Administrator is its own user name Administrator file has a. adnroid file4. Enter the command CD. Android as5. Enter command keytool-list-v-keystore debug.keystore where debug.keystore is studio default KeyStore Can be replaced by their own generated keystore su
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) this.getsystemservice (context.telephony_service);
String DeviceID = Tm.getdeviceid ()//
Setimagebitmap () {//Get ImageView width and height int targetwidth
=photoimageview.getwidth ();
int Targetheight=photoimageview.getheight ();
According to the picture path, obtains the bitmap width and the high bitmapfactory.options options=new bitmapfactory.options ();
Options.injustdecodebounds=true;
Bitmapfactory.decodefile (photopath,options);
int photowidth=options.outwidth;
int photoheight=options.outheight;
Gets the zoom sca
current memory information, cpu information, logcat cache, and kernel cache of the mobile phone;
DumpsysThis is about the Process of all processes in the system. The adb shell dumpsys command has more detailed usage,
For example, adb shell dumpsys meminfo system is used to view the memory information of the process of system.
Dumpsys [options]
Meminfo Display memory information
CPU info displays CPU Information
Account displays accounts informatio
"android:layout_height="Match_parent"android:layout_weight=" 3.0 " /> linearlayout>linearlayout>Because, belongs to the novice to understand the first 2 things. So there is not too much explanation, the comments are very thin (self-think), also suitable for lazy ghosts to use.Source Address: Http://yunpan.cn/cdkX7pQSCamJM access password 82C9 Copyright NOTICE: This article for Bo Master original article, without Bo Master
, the latter have time to focus on a mention. Of course, I seem to stand in the commanding heights of morality, follow a programmer should be good quality, but the face of all kinds of strange bosses, this kind of thing should be careful to do, after all, in order to live, not survival.It is decided that the development of Android will begin, where to use what knowledge to explore.While writing a blog, do it by yourself:Dialer, give me the idea is sho
, (Hey, after all, young, much like others learn)
Summarize:
The company attaches importance to the foundation, every interview has algorithms, although not difficult, it is estimated to look at the code to write the specification
Android Post more questions, and biased in favor of performance tuning, and do not like social recruitment requirements of the various frameworks of familiarity, but to see the framework you used the source
Access address and user name, password, they can use the client and browser for testing and related data analysis.Nebula testing supports multiple modes and mobile devices for communication, USB and wireless as well as Bluetooth. In addition, the oscilloscope supports post-link mode, which does not need to be applied in the process of receiving the test data, so it is well suited for applications that must be performed outdoors, such as telematics, motion Tracker, mobile medical and other devic
Android calls the camera to take pictures and get the original photo solution as follows:Note to have permission to read the file, you need to add the following permissions:button click event: Public voidClick (View view) {Intent Intent=NewIntent (mediastore.action_image_capture);//the intention of the camera to capture the pictureIntent.putextra (Mediastore.extr
phone contact information method (named Getcontactinfo ()), the return value type is list①. Get a Content parser (Contentresolver) object by Getcontentresolver (), named (resolver). You need to get permission (Android.permission.READ_CONTACTS) because you need to read the phone contact.②. Using the Content Parser's query (URI URI, string[] projection, string sel
Get wifi ip address or mobile network IP address for android development tools
Sometimes we need to get the IP address of WIFI to get the IP address of the mobile phone network. This is a tool class dedicated to solving this problem. Here we need two permissions:
The first
Android developed the three ways to get the layout filler first:LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);View view = inflater.inflate(R.layout.item_listview, null); // 第一个参数写你需要加载的布局文件The second type:LayoutInflater inflater = LayoutInflater.from(MainActivity.this// 参数 : 填写contextnull); // 第一个参数写你需要加载的布局文件The third type:View view = View.inflate(MainActivity.t
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.